Search Results

Search: Posts Made By: mheinen
14,241
Posted By mheinen
checking existence of unix file
It's just a matter of checking for the existence of the file and checking the status of that test.

if [ -f $MYHOME/jay.txt ]
then
xxxxxxxx
fi

if [ $? != 0 ]
then
error message ...
Forum: HP-UX 02-09-2007
12,478
Posted By mheinen
Hello Porter, Not gibberish at all. We use ftp...
Hello Porter,
Not gibberish at all. We use ftp commands in Unix shell scripts for several outside vendors and have just the logon information in the .netrc file. Typically we deal with actual file...
Forum: HP-UX 02-08-2007
12,478
Posted By mheinen
Syntax problem with Unix ftp get command
An outside vendor has staged 2 batch files for us and I've tried to retrieve the files using the commands that they've indicated I could use to retrieve one file at a time. I've tried using this...
11,594
Posted By mheinen
Well, I'm constantly learning that there's...
Well, I'm constantly learning that there's multiple ways of doing things in the Unix world! I removed the 'cat' code from my script and ran it again redirecting the output to the new file name and it...
11,594
Posted By mheinen
You put me on the right track. I ended up using...
You put me on the right track. I ended up using sed and successfully stripped off the ^Z at the end of the file by using:

sed '/^Z/d' myfile|cat > newfile

Thanks for the help.
11,594
Posted By mheinen
command to remove last record on file
Hi,
First time on the forum. I have converted some files using the Unix to DOS command but need to strip off the last record that is generated from this conversion that contains just a ^Z. Is there...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 08:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy