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 do I run a .sh file?
What is eval in shell script?
What is the default ubuntu terminal?
What command needs to be used to take the backup?
What language is used in terminal?
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 is the purpose of scripting?
how to get part of string variable with echo command only?
How do we create command aliases in a shell?
Explain about the exit command?
How do I open the shell in cmd?
What is the use of "$?" Sign in shell script?
What is a shell script? Can you name some of its advantages?
Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.
What is the command to find out today's date?