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
What is bash coding?
When should shell programming/scripting not be used?
What are the advantages of using shell scripts?
What makes c shell a more preferable option than the bourne shell?
Which scripting language is best for automation?
Is shell scripting a programming language?
determine the output of the following command: echo ${new:-variable}
Is shell a scripting language?
What is the best scripting language?
What is mac default shell?
What is scripting used for?
What language is used in terminal?
Where is bash history?
What language is bash written in?
How will you pass and access arguments to a script in linux?