10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Issue resolved, thanks (6 Replies)
Discussion started by: dangell82
6 Replies
2. UNIX for Advanced & Expert Users
Hi All
I am using curl in my client environment. We need to pull a file from the libraries site. All the files are having perticular URL which can be used to get the files. Only issue is, when we fire that command , it will take to authentication page 1st. once authentication is succed, it will... (1 Reply)
Discussion started by: prabirkumardhar
1 Replies
3. 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
4. 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
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
x=$(cat <<EOF
Hi.
EOF)
print "$x"
If my shebang is "/bin/ksh" this print "Hi." If my shebang is /bin/ksh93 this errors with:
syntax error at line 3: `(' unmatched.
I guess my default ksh is ksh88.
So, I'm used to setting variables this way, allowing a complex command (that may... (4 Replies)
Discussion started by: mattmiller
4 Replies
7. 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
8. 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
9. 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
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