Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Write a script to print the first 10 elements of fibonacci series.

2408


What is the default shell of solaris?

1084


What does echo $0 do?

1023


What is a command line shell?

1106


Is bash a shell script?

1101


What is the meaning of $1 in shell script?

1158


What is an inode block?

1113


How do I edit a .sh file?

1207


How to write a function?

1073


What is the use of echo in shell script?

1061


What are the different types of shell scripting?

1172


What is computer cli?

952


How do I open the shell in cmd?

1208


What are different types of shell?

971


is this growing field and what is average package in this?

2343