Unix Shell - error message on this script: @: Badly formed number.

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > August 2007 > error message on this script: @: Badly formed number.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author error message on this script: @: Badly formed number.
Janet

2007-08-31, 1:19 pm

What can I do with the following script to get around this error
message. Have not have a problem with this script until now.

Thanks in advance.

Janet
________________________________________
_____________

#!/bin/csh -
f
# /usr/bin/
clean_mereports
# create monthly directory and move month-end reports to an archive
folder to sa
ve
them

# CREATE MONTHLY
DIRECTORY
set mon=`date +
%m`
set yr=`date +
%Y`
@ mon = $mon -
1
@ yr =
$yr
mkdir /spool/mearchives/retl/$mon
$yr

# MOVE FILE TO /SPOOL/
MEARCHIVES
find /spool/nti/retl -type file -a -name "*" -print|xargs -i -t cp {} /
spool/mea
rchives/retl/$mon$yr >> & /tmp/
clean_mereports.log

find /u1/am/arme -type file -a -name "*RETL" -print|xargs -i -t cp {} /
spool/mea
rchives/retl/$mon$yr >> & /tmp/
clean_mereports.log

find /pbs/spool/am/normal -type file -a -name "FISC*R" -print|xargs -i
-t cp {}
/spool/mearchives/retl/$mon$yr >> & /tmp/clean_mereports.log

Ed Morton

2007-08-31, 1:19 pm

Janet wrote:

> What can I do with the following script to get around this error
> message. Have not have a problem with this script until now.
>
> Thanks in advance.
>
> Janet
> ________________________________________
_____________
>
> #!/bin/csh -
> f
> # /usr/bin/
> clean_mereports
> # create monthly directory and move month-end reports to an archive
> folder to sa
> ve
> them
>
> # CREATE MONTHLY
> DIRECTORY
> set mon=`date +
> %m`
> set yr=`date +
> %Y`
> @ mon = $mon -
> 1
> @ yr =
> $yr
> mkdir /spool/mearchives/retl/$mon
> $yr
>
> # MOVE FILE TO /SPOOL/
> MEARCHIVES
> find /spool/nti/retl -type file -a -name "*" -print|xargs -i -t cp {} /
> spool/mea
> rchives/retl/$mon$yr >> & /tmp/
> clean_mereports.log
>
> find /u1/am/arme -type file -a -name "*RETL" -print|xargs -i -t cp {} /
> spool/mea
> rchives/retl/$mon$yr >> & /tmp/
> clean_mereports.log
>
> find /pbs/spool/am/normal -type file -a -name "FISC*R" -print|xargs -i
> -t cp {}
> /spool/mearchives/retl/$mon$yr >> & /tmp/clean_mereports.log
>


a) don't use csh for scripting (see
http://web.archive.org/web/20070106...s-faq-2.html#17)
b) your posting is line-wrapping so severely, even in mid-word, that
it's impossible to know what typos the real script might have.

Ed.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com