10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have an if condition on executing it is giving syntax error as below:
--------------------------------------------------------------------------------------
line 61: syntax error in conditional expression
./play_test.sh: line 61: syntax error near `]'
./play_test.sh: line 61: ` if... (2 Replies)
Discussion started by: ramki067
2 Replies
2. UNIX for Dummies Questions & Answers
Hi!
(I guess this could of gone into the scripting forum, but Unix for Dummies seemed more appropriate. Please note that I am not in school, so Homework doesn't seem appropriate either. You guys can let me know if you think otherwise.)
I am following an exercise in a book on ksh scripting which... (2 Replies)
Discussion started by: sudon't
2 Replies
3. Shell Programming and Scripting
if && ]
then
+ : test: ] missing
Thanks in advance :) (8 Replies)
Discussion started by: ezee
8 Replies
4. Shell Programming and Scripting
if
Please indicate the problem with this code
Thanks in advance :) (4 Replies)
Discussion started by: ezee
4 Replies
5. Shell Programming and Scripting
I'm having an issue using OR condition, the script seems to work just fine but gives an error message while executing as can be seen in BOLD RED below:
Code:
#cat test.sh
#!/bin/ksh
set -x
if || > /dev/null 2>&1;then
echo "Fibre adapter found"
else
echo "No fibre... (10 Replies)
Discussion started by: mbak
10 Replies
6. Shell Programming and Scripting
Hi. I expect the following unix script command to return 8:
ls -ltr dropez* | grep -c dropez
I can't seem to find the correct syntax (borne shell), can anyone help be to write an IF condition something like this:
IF (ls -ltr dropez* | grep -c dropez) = 8 THEN
...do stuff
ELSE
...do... (4 Replies)
Discussion started by: buechler66
4 Replies
7. Shell Programming and Scripting
I have four variables, dumpdata, defndata, compare1 and compare2
I want an IF statement condition which returns true when either dumpdata=defndata or (dumpdata<=compare1 and dumpdata>=compare2).
But this is not working for me..
if (4 Replies)
Discussion started by: indianjassi
4 Replies
8. Shell Programming and Scripting
Whats wrong with below logic or syntax???? (4 Replies)
Discussion started by: dsravan
4 Replies
9. Shell Programming and Scripting
Hi All,
why doesn't this code start apache at boot?
Cheers.
coolboarderguy...
startApache=/usr/local/apache2/bin/apachectl start
if ; then
. $startApache
fi (5 Replies)
Discussion started by: coolboarderguy
5 Replies
10. Shell Programming and Scripting
I wrote this code and did not know what did I do wrong ??
## get the first line of this file
AFIRST=$(head -1 rss-cs-3423a-20051211-060001.dat)
#CJKA|2005-12-10 08.01.30.000000|1111111111|ECI|1112221111|1113331111|1114441111 <--- this is a answer
## Third line of stat file
BTHREE=$(cat... (11 Replies)
Discussion started by: sabercats
11 Replies