10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The below bash function uses multiple variables CODING, SAMPLE, SURVEY, andvariant
in it. The user selects the cap function and details are displayed on the screen using the $SURVEY variable, the directory is changed to $SAMPLE and the samples.txt is opened so the user can select the sample to... (6 Replies)
Discussion started by: cmccabe
6 Replies
2. Shell Programming and Scripting
Hi ,
I have script as follows ,
#!/usr/bin/ksh -x
if
then
alias echo="echo -e"
fi
MAX_ENTRIES=1024
nb_of_entries=`echo "$list_of_entries" | wc -w`
# Set number of tables
eval nb_of_tables=\`expr `expr $nb_of_entries / $MAX_ENTRIES` + 1 \`
# Output the number of tables
echo... (6 Replies)
Discussion started by: breezevinay
6 Replies
3. Shell Programming and Scripting
I'm getting an error while running this script. Need help.
set -x verbose #echo on
clear #clear the screen
USERNAME="bbb"
PASSWORD="password"
SERVER="192.168.1.100"
WAIT_TIME=300
FILE_PATH="/home/users/xxx/MMM" # local directory to pickup *.dat file
REMOTE_PATH="/Drop_off/xxx/yyy" #... (17 Replies)
Discussion started by: clgz2002
17 Replies
4. Shell Programming and Scripting
Hi
Can any one help, I'm trying to run a script that beeps out the ip address from the PC internal speaker with the following script. It keeps throwing the error "Syntax error: Bad for loop variable" on line 16. I know its picking up the IP ADDRESS correctly. Any ideas on whats wrong. I'm... (3 Replies)
Discussion started by: dman
3 Replies
5. Shell Programming and Scripting
Hello all,
I have "inherited" a Korn shell script I'm supposed to maintain, and running a "sh -n" on it, I got this syntax error:
script.sh: syntax error at line 63: `OB_DEVICE=$' unexpected
The line in cause is the first occurence of the usage of perl one-liners. The whole line:
... (2 Replies)
Discussion started by: AdrianM
2 Replies
6. Shell Programming and Scripting
I am trying to write a script that will do a sql statement. But in the sql I will have a list (1,2,3,4).
How would I go about asking for the input from the user running the script, and then transferring that back into the list as say ($var1,$var2,$var3)?
It would be somewhat like this:
... (1 Reply)
Discussion started by: Captain
1 Replies
7. UNIX for Dummies Questions & Answers
I am trying to use use the AWK and EGREP commands together in an AWK script. My overall objective is to count lines of code but exclude comments and blank lines and such.
I am able to use AWK with the FIND command like so:
| awk '{print \"wc -l \"$1}' > lineCount.sh
Now when I modify the... (7 Replies)
Discussion started by: mastachef
7 Replies
8. Solaris
There is a possibility to set a variable, having an another variable in it's name:
prompt% setenv PRT one
prompt% setenv VAR_${PRT} value
prompt%
So, this way the VAR_one = "value" and could be viewed:
prompt% echo VAR_one
value
prompt%
Q: How to view a variable having another... (0 Replies)
Discussion started by: alex_5161
0 Replies
9. UNIX for Dummies Questions & Answers
I need some syntax help (working in a bash shell)
I have a variable which is a filename with an extension, and I need to create another variable with the same name but a different extension
To explain, the input file should be called something like "filename.L1" and the output file should be... (1 Reply)
Discussion started by: Slanter
1 Replies
10. Shell Programming and Scripting
How to export variables on a UNIX prompt. Please provide me syntax.
Thanks in advance.
Malay (5 Replies)
Discussion started by: malaymaru
5 Replies