Results 1 to 4 of 4
Hi,
I have two files a.txt and b.txt.
a.txt content:
919199991919
b.txt content:
926252525552
What i am getting is by shooting----- #cat a.txt b.txt >> c.txt:
919199991919926252525552
Desired output in ...
- 11-23-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 2
Files Concatenation
Hi,
I have two files a.txt and b.txt.
a.txt content:
919199991919
b.txt content:
926252525552
What i am getting is by shooting----- #cat a.txt b.txt >> c.txt:
919199991919926252525552
Desired output in c.txt the second number should be in new line:
919199991919
926252525552
Please help!
Thanks in advance..
- 11-23-2010 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Well, if a.txt is not new-line terminated, then what you get is what you got! What you need to do is either to fix up the file(s) so that they have a proper new-line (line-feed in Linux/Unix systems), or create an intermediate file that has such, and then do "cat a.txt nl.txt b.txt" where nl.txt is a file with JUST a new-line in it. That should work for you.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-23-2010 #3Just Joined!
- Join Date
- Nov 2010
- Posts
- 2
Thanks Superman....
- 11-23-2010 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
I'd change my online handle, but DC Comics may complain about trademark infringement!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote