![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script not working..."sort" not working properly.... | Rahulpict | Shell Programming and Scripting | 23 | 03-16-2009 11:13 AM |
| awk not working in script | doitnow | Shell Programming and Scripting | 3 | 08-28-2008 06:36 AM |
| bdf script not working !! | kpatel786 | Shell Programming and Scripting | 3 | 11-16-2007 11:10 AM |
| Pls. Help my script not working as it should | cocoabeauty1 | Shell Programming and Scripting | 1 | 07-28-2007 05:11 PM |
| FTP script not working | rookie250 | Shell Programming and Scripting | 2 | 12-19-2006 02:49 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Script not working with SCO
Hi
In a script I have on a FreeBSD machine [ $FILEA -nt $FILEB ] checks to see if FILEA is newer than FILEB however on an SCO machine there isn't a -nt option. Can anyone please tell me of an equivalent I can use? Many thanks Tony |
|
||||
|
This is the script
#!/bin/sh MONITORED_FILE=/root/temp TEMP_FILE=/root/temp.1 [ ! -f $TEMP_FILE ] && touch -r $MONITORED_FILE $TEMP_FILE if [ $MONITORED_FILE -nt $TEMP_FILE ] then ftp -i -n <<EOF o 10.48.83.201 user ##### ####### cd vendor/cisco put $MONITORED_FILE temp.txt bye EOF fi touch -r $MONITORED_FILE $TEMP_FILE when run on SCO i get # ./ftpscript UX:test (./ftpscript): ERROR: -nt: Unknown operator # Looking on the man page doesn't show an -nt operator so now i'm stuck. Any help or another way of doing the same thing would be of great help thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|