Issue String concatenating in output file
Hi friends,
i am having issue in the below statement in Linux mv a.txt /home/app 1>> `echo "file moved.." >> b.out` 2>> b.out when i execute the above statement the below error appears `echo "file moved.." >> b.out`: ambiguous redirect Kindly provide your comments. Thanks in advance MSK |
I'm really confused, what are you trying to achieve with that command???
why all those redirections??? |
hi,
i have to move a.txt file to the specified location on successful movement,am writing a message in the output file b.out . if there is any system errors i am writing into the same file using 2>> b.out In general normal redirect is 1>> and for system errors 2>> Please correct me if i am wrong. |
Code:
if mv a.txt /home/app 2>> b.out Code:
mv a.txt /home/app 2>> b.out && echo "file moved..." >> b.out |
Thanks
Hi colucix,
its working fine thank you very much. Regards, MSK |
All times are GMT -5. The time now is 09:22 PM. |