[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Monday 24 January 2005 8:34 pm, Simon Waters wrote:
Neil Williams wrote: | If you've got a bash script of say 150 lines and it fails at line 60, is there | a way of adapting the script to allow a restart at line 60? tail -90 script | bash
Ha, ha. Won't work. I'm using variables from within the script to alter the commands and filenames. I can't just copy the command from the screen, it would have to be edited on the command line - serious bug bear when there are still 90 lines left to process!!!
| How would the script be written to accept command line arguments to jump to | that line? What did Larry say about allowing goto ?
I'm not using goto, I'm using if [ $jump < 40 ] then ... fi so bash script.sh -j 50 means to skip all sections prior to that sector. The script issues email error notices that specify the sector number. If anyone is REALLY interested, it'll be part of the next QOF-QSF tarball here: http://code.neil.williamsleesmill.me.uk/qofqsf.html#AEN212 sometime tomorrow. You'll find it in patches/scripts/working/automate.sh -- Neil Williams ============= http://www.dcglug.org.uk/ http://www.nosoftwarepatents.com/ http://sourceforge.net/projects/isbnsearch/ http://www.williamsleesmill.me.uk/ http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
Attachment:
pgp00073.pgp
Description: PGP signature