Unix C++
Would you like to react to this message? Create an account in a few clicks or log in to continue.

unix command!!!!

2 posters

Go down

unix command!!!! Empty unix command!!!!

Post by Abhiramy Tue Mar 02, 2010 4:13 pm

can anyone tell what command is used to combine the contents of two files into another file??????

Abhiramy

Posts : 9
Points : 21
Join date : 2010-02-26

Back to top Go down

unix command!!!! Empty Re: unix command!!!!

Post by Abhiramy Tue Mar 02, 2010 4:18 pm

i myself found out!!!!!

awk '{getline x<f;print x;getline x<f;print x;print;getline;print}' f=file1 file2

Abhiramy

Posts : 9
Points : 21
Join date : 2010-02-26

Back to top Go down

unix command!!!! Empty Re: unix command!!!!

Post by Christopher Tue Mar 02, 2010 4:20 pm

simple way to do this.

cat sample1.txt sample2.txt> sample3.txt

contents of files "sample1.txt" and "sample2.txt" will be copied to "sample3.txt"
Christopher
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 35

https://unixcpp.forumotion.com

Back to top Go down

unix command!!!! Empty Re: unix command!!!!

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum