![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| separating comma delimited words | rider29 | Shell Programming and Scripting | 4 | 09-02-2009 10:12 AM |
| merging similar columns in a single line file | repinementer | Shell Programming and Scripting | 7 | 05-28-2009 03:41 AM |
| Converting Space delimited file to Tab delimited file | jeevs81 | UNIX for Dummies Questions & Answers | 16 | 02-26-2009 02:49 AM |
| replace space or spaces in a line of a file with a single : | NewSolarisAdmin | Shell Programming and Scripting | 5 | 01-27-2009 02:48 PM |
| Searching for text in a Space delimited File | andyblaylock | UNIX for Dummies Questions & Answers | 6 | 11-27-2007 07:33 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Merging files into a single tab delimited file with a space separating
I have a folder that contains say 50 files in a sequential order:
Code:
cdf_1.txt cdf_2.txt cdf_3.txt cdf_3.txt . . . cdf_50.txt. I used the following shell script: Code:
for x in {1..50};
do cat cdf_${x}.txt >> All.txt;
done
What I need is to give a space between the contents of files in the All.txt so that I could know the contents of each file separately in the All.txt. Is there a way to modify the above shell script to give a space between the content of every file? Please let me know. Last edited by radoulov; 1 Week Ago at 05:33 PM.. Reason: added code tags |
|
||||
|
Or (a little easier if you are doing many things):
Code:
for x in {1..50}
do
cat cdf_${x}.txt
echo
done > all.txt
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|