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
Issue resolved, thanks (6 Replies)
Discussion started by: dangell82
6 Replies
3. Shell Programming and Scripting
Hi All,
I am getting a syntax error message while trying to compare 2 files using the compare function (LINUX)
command substitution: line 79: syntax error near unexpected token `('
command substitution: line 79: `cmp -s <(tr , \n < $COMMON_TMP/nt_per_gs.done | sort) <(tr , \n <... (5 Replies)
Discussion started by: dsfreddie
5 Replies
4. UNIX for Dummies Questions & Answers
Hi !
I got a script from Arabic to Roman numeral conversion - .comp.lang.awk, that I would like to modify to apply it on my input file.
input ("|"-delimited fields):
AAAAAA|1, 10, 13, 14, 25, 60
wanted output:
AAAAAA|I, X, XIII, XIV, XXV, LX
script.awk:
#!/usr/bin/gawk -f
... (11 Replies)
Discussion started by: lucasvs
11 Replies
5. Shell Programming and Scripting
Hi all,
Anyone know why I get the error below under ksh?
$ EXCLUDES=( $(< "$EXCLUDES_FILE") )
sh: syntax error: `(' unexpected
I'm trying to use the above line in a script and it's not working. The guy that gave me the script was running in a linux environment, so I'm thinking this might... (1 Reply)
Discussion started by: mmw
1 Replies
6. Shell Programming and Scripting
Hi, I would like to know what is the correct syntax to perform a function in awk. Although I have seen several examples, not get it to work, this is what I'm trying:
#!/bin/bash
awk
function multi (number) {
return number * 3
}
print multi (4)Thanks (2 Replies)
Discussion started by: Godie
2 Replies
7. Shell Programming and Scripting
So I am trying to convert my bash script into ksh, and this is what I have in the file so far:
#!/bin/ksh
login()
{
if
then
sendcmd BETA
else
sendcmd "$(xxd -c 32 -g 0 ${ZETA_ZETA} | awk '{print $2}')"
fi
}
But when I run it:
$ ./test.sh ... (1 Reply)
Discussion started by: guitarscn
1 Replies
8. Shell Programming and Scripting
Just want to ask if the below code is correct;
if ; then
echo "No log found from " $data
exit 0
else
cat out.txt
fi
this is to test if the content of out.txt is 0 then message appear that there is no log. Is this correct? (3 Replies)
Discussion started by: harry0013
3 Replies
9. Shell Programming and Scripting
Hi all,
I am struck with syntax for long time,
Need to purge some lines from given file
Not able to use value of $x
Example of ksh script...
Facing some syntax issue.
Have Tried ‘with single , double ,backtick “” ` and \ escape character , doesn't seem to work.
<line 1> echo $x #... (2 Replies)
Discussion started by: manav666
2 Replies
10. Shell Programming and Scripting
Hi
I got this part of the script from the mimetool by Perderabo.
I have difficulty in decyphering the syntax specially lines 4,5 & 9.
Also the test condition in line 3.
Could someone help me on this please.
--------------------------------------
pwentry=$(grep "^$(logname):" /etc/paswd)... (2 Replies)
Discussion started by: chaandana
2 Replies