how to separate the even and odd number generated from one
file to two separate file i.e. even numbers in file1.txt and
odd numbers in file2.txt
Answer Posted / jaya prasad
echo "Enter the file name"
read file
awk '$NF % 2 == 0' $file > file1.txt
awk '$NF % 2 != 0' $file > file2.txt
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
How can you get the value of pi till a 100 decimal places?
How do you know which shell I am using?
Is it possible to substitute "ls" command in the place of "echo" command?
Write a shell script to get current date, time, user name and current working directory.
What is the difference between break and continue commands?
Why are shell scripts used?
What is sed in shell script?
What are "c" and "b" permission fields of a file?
What is batch file programming?
What is bash coding?
What shell is bin sh?
How do I set bash as default shell mac?
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?
How to open a read-only file in the shell?