Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
help with script - I am new to Unix
Name: sammyboy Date: December 4, 2001 at 13:11:33 Pacific
Comment:
I am new to Unix and I am trying to write a Bourne shell script. I have 2 questions:
1. One of the command line parms for the script needs to be converted to upper case within the script, how do I do this? I tried tr 'a-z' 'A-Z'. It works fine on the command line but not when I want to pass $1 to change it to upper case in my script
2. I am reading 2 parms from the command line, and I want to set a default if no parms are entered. How do I do this? will this work? case $# in 1)days=$1;; 0)days=2;; 2)domain=$2;; 0)domain=mydomain;; esac
2) # Start of sample-1 case $# in 0) days=default; domain=default;; 1) days=$1; domain=default;; 2) days=$1; domain=$2;; esac # End of sample-1, start of sample-2 days=default; domain=default; case $# in 1) days=$1;; 2) days=$1; domain=$2;; esac # End of sample-2
Summary: I need a help from you. i am new to shell scripting. please help on this script. i want a script monitor the log file and take the last 10 min update data and put it into a file and it need to compare...
Summary: I am new to UNIX. Can anyone please help me: I am to write a Bourne shell script that mimics certain functionality of the UNIX find command. Any help is very appreciative. ...
Summary: Guys, I am new to UNIX world and really need help of your expertise. I have file with each line of fixed length eg., DT00123 1234 FFF 56565 DT00923XX3425ZZFFFYY34281 As you can see there is no fix del...