I am using AIX and ksh.
I need to display the contents of a file that has a pid (process id). Because the file is open, it doesn't have the line feed or new line, so for some reason if I do this:
`cat $pid` , where $pid is the name of the fully qualified file, it displays
test3.sh[12]: 426110: not found
It should display:
426110
I tried to copy the file and then try to run vi through the scripts; and edit it; and save it so that a /n will be added at the end (assuming that that is the problem). The file only has one line which is the number of the process id.
It seems simple, but no luck. Any suggestions please....? thank you
Then you would manipulate $catPid with commands like:
echo ${catPid}
although that seems a bit redundant...
Anyway, the first 11 lines (and the rest) might seem to have a bearing on the issue, but hard to tell without seeing them. Maybe it will be clearer if you show the whole script.