on 09-10-2012 11:36 AM
I want to Run an OS command below to concatenate the files in Receiver Communication Channel under " Run OPerating System Command After Message Processing" :
/usr/bin/cat XXX/XX/*.txt > XXX/XX/op.txt
The channels runs successfully and it does not fail or give warning . All it gives is Information : Execute OS command "/usr/bin/cat XXX/XX/*.txt > XXX/XX/op.txt". Still the *.txt files kept does not get concatenated.
Can anyone please suggest how to do the concatenation using OS command or let me know the correction required above
Hi Pankaj,
you are using correct command it seems. Just try modifying the command to this form
cat /usr/mydir/*.txt> /usr/mydir/op.txt 2>/usr/mydir/error.txt
I am using absolute path while describing the path name. Each path starts from root ("/").
Secondly if there is any error in script it is written down to a file /usr/mydir/error.txt . After execution of script is complete please check contents of the file /usr/mydir/error.txt, you will find reason of error.
Hope this resolves your problem.
All the best.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just few cents... Check whether script user credentials has priviledge to access these two files. That could be a problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pankaj,
As Raja, said try to test the script alone and then try to use in your communication channel.
But, I think there would be an issue, if you are using the same folder and with the same extension of the file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it looks the way you calling script is not a right approach, run your script stand alone and see the fucntionality, if it is working then it should work when you cann from PI also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.