Home » Infrastructure » Unix » Shell script append a file to another
Shell script append a file to another [message #148101] Tue, 22 November 2005 15:39 Go to next message
mchittib
Messages: 87
Registered: September 2005
Member
In a shell script how can i append the contents of a file to another.
suppose if i want a.log contents to be appended to b.log.

i tried
print cat a.log >> b.log

and its just copying "cat a.log" into b.log instead of a.log contents.

Can someone help me.

Thanks.
Re: Shell script append a file to another [message #148106 is a reply to message #148101] Tue, 22 November 2005 16:49 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Not sure what you are looking into.Just remove the print. it should work (contents of a.log is appended into b.log).

cat a.log >> b.log
Re: Shell script append a file to another [message #148335 is a reply to message #148106] Wed, 23 November 2005 13:07 Go to previous message
mchittib
Messages: 87
Registered: September 2005
Member
thats works.
thanks a lot.
Previous Topic: setting up TNS.ORA file on UNIX
Next Topic: oracle9i on solaris9
Goto Forum:
  


Current Time: Fri Mar 29 03:16:31 CDT 2024