Getting unexpected error

Hi All,

I am writing one script to automate one of the process and for that I am using below command at one line :

uncompress `cat tmp`

content in tmp file are :

/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02108.DAT.Z
/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02109.DAT.Z
/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02110.DAT.Z
/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02111.DAT.Z

this path and file names are correct I checked it manually but still I am getting error - A file or directory in the path name does not exist.

Can somebody please guide me I am tring to fix this from last 3 days..:frowning:

thanks

This should be no problem - either the way you tried it or with having cat piping it to xargs. Did you try a simple

ls /home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02108.DAT.Z

?
Do you get more information about the error when you add a -v to your uncompress ?

Please use code tags when posting code, data or logs, thanks.

Thanks zaxxon for your reply
I am getting correct output for

ls /home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02108.DAT.Z

and if I am executing

 uncompress `cat tmp` 

from command window it is running fine but when i am using this statement in script it is showing me error, so do you have any idea what may be the cause ??

Ah ok, different situation then. It seems that it can't find tmp which should be either used with absolute path or your script has to be executed from the directory level above tmp so that it could be found.

Both are from the same directory see the output..

/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02108.DAT.Z
/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02109.DAT.Z
/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02110.DAT.Z
/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02111.DAT.Z
/home/vas/aqbatch/newbatch/archive/output/RIM_GUIDEPRICE_AQ_02112.DAT.Z: A file or directory in the path name does not exist.

Is this a directory where the files are often moved, renamed or deleted etc., ie. is there a lot of "traffic" in it?
Is there a filename already in the list "tmp" when it is not already existent in the folder?

Next time you issue uncompress ... , try following and post it's output:

VAR=/home/vas/aqbatch/newbatch/archive/output
cat tmp
echo '-----------------'
ls -la $VAR
echo '-----------------'
uncompress `cat tmp`
echo '-----------------'
ls -la $VAR