Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

appending files

Status
Not open for further replies.

spiderteen155

Technical User
Joined
Jan 14, 2003
Messages
1
Location
US
the number of files used can be from 2 to 6 and the r is optinal. file1 through file6 must be regualr files and Newfile must not exist. The script is to add the contents of file1, file2, file3, ... to newfile. If the option r is present the files should be appened to newfile in reverse order otherwise the files are appended as entered.

an example input would be APPEND file1 file2 [file3] [file3] [file4] [file5] [file6] NewFile[r]

where APPEND is the script name.

the files contain some junk lines, nothing important, the purpose is to show how to append files

i am just curious how appending files work. Any help would be appreciated.
 

in APPEND:

case x$1 in x) cat file[1-6] >appended_files
;; xr) cat `ls -r file[1-6]` >appended_files
;; esac -----------
Ohne Intelligenz bist Du ein Fiasko,
ohne Technik ein Amateur und
ohne Herz eine Maschine.

[ Wladimir Horowitz ]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top