the command dos2unix does the job too.

-----Original Message-----
From: Fargusson.Alan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 24, 2005 1:14 PM
To: [email protected]
Subject: Re: Guidance on writing script

When you edit with vi does it show [dos] at the bottom of the screen?

If it does you need to do a ":set ff=unix", then save the file.

-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
Longstreth, Lance
Sent: Tuesday, May 24, 2005 11:06 AM
To: [email protected]
Subject: Guidance on writing script



 I had used Microsoft notepad originally to create the script and store it
on a samba share. I am now using VI to edit, I went to the end of the line
and hit the delete key til it took out the semi-colon, I then reinserted the
semi-colon. I must have had some junk from when I used notepad originally.
Anyway it no longer complains of the path now it is the -exec.
  In the MAN pages for FIND it had showed `{}' as an example for the string
in -exec. This is why I originally had the marks in the script.
But, when I reinsert as shown in the MAN pages I still receive an error that
it is missing an argument for -exec.


[EMAIL PROTECTED]:~> sh -x del.sh
' find /var/log/ -mtime +7 -type f -exec rm '{}' ';
find: missing argument to `-exec'

########################################################################
#     deletelg.sh -- Script to delete logs files                       #
#     changed to only keep +7                                          #
########################################################################
find /var/log/ -mtime +7 -type f -exec rm {} \;

Lance Longstreth
Bandag Inc
Technical Support & Operations
zOS systems/Linux
1-(563)-262-2927
[EMAIL PROTECTED]




----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions, send email
to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions, send email
to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to