Apart from the fact that you should use "CODE"-tags, as stated in the forum rules and even in the creation mask for any new thread, this won't work at all.
You can't read from a file ("cat Rewards_Siebel") and write to it ("> Rewards_Siebel") at the same time, for reasons stated here. You will have to create a temporary file and the move it over the original file "Rewards_Siebel" to get what you want.
Thanks for your reply,
It is not like reading from a file ("cat Rewards_Siebel") and write to it ("> Rewards_Siebel") at the same time.
We have three different files 'Rewards_Header', 'Rewards_Siebel_Notif_temp' and 'Rewards_Siebel_Remind105_temp' trying to write to file 'Rewards_Siebel'.
I just wanted to know the possible way of checkng if the merging of these three files into one file 'Rewards_Siebel' is successful or not.
OK, my bad. Sorry. I must have misread the filenames somehow.
This can't fail in normal circumstances, because this is what "cat" is for: ConCATenate files. As long as i.e. the disk is not full "cat" is supposed to work.
You might have special characters in (one of) your files: file-end-markers or similar. Use "od -ax <file> | more" to check for that. As a more simple test open it in "vi" and enter ":set list" to display normally unprintable characters.
I would point you to the exit code (=error level) of "cat", but this would reflect only errors in the operation of "cat" itself: a full disk or other unability to write the output file would show there, but malformed ASCII-files do not affect "cat"s operation and therefore will not reflect there.