10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Issue resolved, thanks (6 Replies)
Discussion started by: dangell82
6 Replies
2. Shell Programming and Scripting
The syntax of 'if' conditionals in bash and ksh seems different. I am trying to check for a particular version using 'if' in ksh. This very simple syntax gives syntax error. I have tried many variants, but no go. Please correct the syntax. Later I will expand it to 'if' and 'else'.
#!/bin/ksh... (8 Replies)
Discussion started by: nivedhitha
8 Replies
3. 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
4. Shell Programming and Scripting
It saves me lot of typing and space/lines when I do not use full 'if' keyword and construct, instead use ..
&& <statement> || <statement>
that perfectly replaces..
if ; then
<statement>
else
<statement>
fi
Can I use following syntax when I want to add multiple statements under 'if'... (4 Replies)
Discussion started by: kchinnam
4 Replies
5. 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
6. Shell Programming and Scripting
Hi,
I wanted to know what's the difference between the below two syntax used for writing ksh function:
e.g. 1
------
function fn1
{
echo "Hello World"
}
e.g. 2
------
fn1 ()
{
echo "Hello World"
} (4 Replies)
Discussion started by: dips_ag
4 Replies
7. Shell Programming and Scripting
To check a bash script syntax without executing it we use:
bash -n scriptname
What should be the equivalent command for checking a ksh script? (8 Replies)
Discussion started by: proactiveaditya
8 Replies
8. 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
9. Shell Programming and Scripting
Quick question,
File A has one line (10 charachters), File B has one line (10 charachters).
how do a concat these two files together to produce a file (File C) that has the contents of Files A + B together onto one line of 20 Charachters
if I use:
cat FileA FileB > FileC
I get the... (5 Replies)
Discussion started by: kshelluser
5 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