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.
Variables in Shell SCripting
Name: pmjain Date: February 26, 2004 at 22:14:10 Pacific OS: UNIX/Window CPU/Ram: ----
Comment:
Shell Scripting -- Variables In the main script i have exported the variable and accessing it in another file but when i echo the value the value of the exported variable is not viewable . below are the scripts . can anyone let me know whats wrong with the following script
main script looks like ---- . ./functions.sh export SCRIPT_NAME SCRIPT_NAME=testing.sh ---- functions.sh looks like as below ---- OUTPUT_DIR=/export/shalini/ OUTPUT_FILE=$SCRIPT_NAME OUTPUT=${OUTPUT_DIR}/${OUTPUT_FILE}
Summary: Hi, Im trying to set variables in awk script but does not work, I dont know what Im doint wrong, this is my script. #!/bin/sh snmp-cpu="`snmpwalk -v 1 -c public -Oqv 10.10.1.1 1.3.6.1.4.1.9.2.1.58.0`...
Summary: Hi i've been trying to write shell script with awk that I want to search a substring with variable of shell script In old one ,I wrote awk that find 'xxx' in myfile : #!/bin/ksh awk '/xxx/' myfile...
Summary: Can anyone help me with comparing two vaiables in unix shell script. This is what i'm trying.... if [ $X -ne $Y ] then ----- else ---- fi Where X and Y are varibles with diff values. thanks in...