|
One last command after "exit 1"? Hi, I have a problem in a script that I can't seem to resolve. I'm writing a series of install scripts, and among other things, I have a fancy little function check_status... you've ever seen Gentoo's or Mandrake's boot scripts, with all those fancy little [ OK ] in green and [ FAIL ] in red? Well, check_status ... 15 Feb 2006 11:51
Define Variable Data Type Hi, I'm using variables at the moment in script with a mathematical purpose, or at least trying. Could anyone explain how to tell bourne that I want a variable to be numerical, rather than string? At the moment my variables which are supposed to hold totals are holding strings like '15+19'. Thanks very much, ... 14 Feb 2006 03:53
script to send automatic email Hi, The scenario is the awk command should check the second field of the output, if it is greater than 80 it should trigger an automatic email to me in this address, Help me to do this Regards, Gopi Krishnan ... 12 Feb 2006 00:23
losf equivalent in perl Hi Is there any equivalent of the lsof command in perl (may be a module ?) .. Thanks. Nikhil ... 12 Feb 2006 14:28
crontab syntax Sorry if this is not the place for this post. Wasn't sure where to put it. Need the ability to run something from cron every other Monday and then another script every other Wed. I've experimented with 1/2 and 3/2 thinking that it would get me what I need, but all it does is detect an error on input and not cre... 10 Feb 2006 18:54
"or" in bash if statements feel really stoooopid asking this but I've gogled etc to no avail... how does one put an "or" in a bash shell if statement? I am trying the following if [ /etc/passwd -nt timestamp || /etc/shadow -nt timestamp ]; then echo yes fi but receive the error : [: missing `]' : /etc/shadow: Permission deni... 2 Feb 2006 15:05
How to unset $1? I have $1, $2, $3 command line arguments that remain after a script is called. If the next script is called without command line arguments, these $1, $2, $3 are still in the environment and are evaluated by getops. Is there any way to clear these positional arguments? echo $1 $2 $3 -abc -def -ghi $ un... 27 Jan 2006 16:41
string comparison problem in bash 3.00 My script takes user input and compare it with some values. It works fine when it compares against 0.00 or 10 or 100. But if the user input is something like "-0.009" it gives error - "integer expression expected in line 7 and line 9" where it ought to print the number like - your number is -0.009. Here's the... 26 Jan 2006 03:45
common history in bash Hi All, I was trying to get multiple bash sessions to share a common history. It seems the standard way of doing this is by configuring the following: export PROMPT_COMMAND='history -a; history -n' However this seems to be broken. There is an email on gnu.bash.bug detailing the bug: http://groups.google.co... 22 Jan 2006 21:04
How to open, lock, write and close a file in ksh I am a beginner in shell scripting. I have a question regarding file handling in shell script. There is a perl script as follows: open (WRITEFILE, ">>/user/test.html"); flock WRITEFILE, LOCK_EX; print (WRITEFILE "test"); ..... print (WRITEFILE "<BR>"); close WRITEFILE If I want to change this to ksh script... 23 Jan 2006 03:13 |