Viewing 1 to 5 of 5 items
Tag Archives: Exit 1

grep inside for-loop

dont use capital letter vars. those are better used by the environment. never try to parse ls output. use globbing instead. if you’re writting bash, then prefer [[ over [. do not cat file to read it. instead read it in a while loop. always quote your variables. they’re also easier found if grouped. treat a list of files, as an array. if you  Full Article…

0

How to check if process is running?

To me this script looks fine. Can somebody please assist me in finding what the problem is. Thank you Code: #!/bin/bash #———————————————————————————————————————- #This script allows the user to import a dsx file # # Usage: #./import.sh -s -d -r -f # #———————————————————————————————————————– dbname=”$dbname” dsn=”$dsn” dsxfile=”$dsxfile” rangechk=”$rangechk” verbose=”” reverb=”” module=`basename $0` DSXLOG_MODULE=$module export DSXLOG_MODULE dsxdir=”/var/local/dsx/import” dsximp=”/usr/local/bin/dsximp.exe”  Full Article…

0

Menu Driven Shell Script – Using Dialog Utility

#!/bin/bash # SCRIPT : menu_dialog.sh # PURPOSE : A menu driven Shell script using dialog utility # which has following options: # Display Today’s Date and Time. # Display calendar. # Delete selected file from supplied directory. # List of users currently logged in # Disk Statistics # Exit # ############################################################################## # Checking availability of  Full Article…

0