oops !! its my bad . The condition is when both the variable $1 $2 exit code is 0 it should display {Request Authenticated }. Since the above syntax is erroring out again
This is the variable condition, on which im verifying.
enable = exit code 0
enables = exit code 1
server123= exit code 0 [ Existing Server]
serverABC= exit code 1 [ Non Existing Server ]
Condition on which im testing is :
Condition 1. Device name doesn't exist in hosts file . The corresponding output can been seen here. Conclusion : Satisfied. Displays desired output.
But should have excluded " Correct Input Parameters "
Condition 2 : Incorrect state parameter . The corresponding output can be seen here. Conclusion : Very Much Satisfied. Displaying the USAGE.
Condition 3 When both parameters are correct, still this " Correct Input Parameters " is being displayed , either it should have omitted when both variables are satisfying the condition on which they are assigned too.
Conclusion: Not Satisfied. Need to work on it.
But from above if loop changes its not being fully effective on the script, do we need to apply an elif statement here.
function get_tablespace()
{
## Get the current size of the tablespace
size=`su -l oracle -c 'db-control report' |egrep "DATA_TBS" | awk '{print $5}'|tr -d '%'`
## Loop through until the size is 82 or less
count=0
while &&
do
... (2 Replies)
Hello everyone,
I need a little help. I wrote a cshell script to change the format of a file but it is not working.
input file is like that:
2014 3 20 15 0 5.270 40.7739 27.6471 20.232 0.6 0 0 0 1
Site6 4.081 1.00 P
Site6 7.585 1.00 S
Site1 4.441 1.00 P... (9 Replies)
Hi ! all I am just trying to check range in my datafile
pls tell me why its resulting wrong
admin@IEEE:~/Desktop$ cat test.txt
0 28.4
5 28.4
10 28.4
15 28.5
20 28.5
25 28.6
30 28.6
35 28.7
40 28.7
45 28.7
50 28.8
55 28.8
60 28.8
65 28.1... (2 Replies)
Hello guys,
This truly is a newbie question. I'm trying to make a loop to execute simultaneous commands indefinitely while using variable. Here is how my mess looks like (this is just an example):
#!/bin/bash
IP=`shuf -n 1 IP.txt` # I figured this would be easier to select random lines... (4 Replies)
hello everybody,
here's my code
mkf ()
{
INDEX=0;
while ; do
touch "file$1.f";
INDEX=$INDEX+1;
done
}
when I type
mkf 10
the loop seems to act infinite
and only the last file of the loop is created, in the example below, there just is file10.f in... (11 Replies)
Hi all,
I have been given a task to search for strings in a file that is encoded. I need to display the file name only when all the 3 strings which i provide are present in the file name.
i first try to get a list of files according from the directory according to the value passed in argument... (0 Replies)
Hi there, i've written a script to extract a portion of a MySQL database table and convert it to CSV and then to import it back as CSV to MySQL. Initially it worked without the while loop but after adding the while loop statement, i am getting the following error:
./export-csv-coordinates.sh:... (4 Replies)
The script is
And the error is
+ count=2
./FindEID.ksh: line 227: syntax error near unexpected token `else'
./FindEID.ksh: line 227: ` else'
I just can't find out what the problem is, can anyone tell me about this error is?
Thank you (5 Replies)
#!/bin/bash
for file in $HOME/*;
do
if ; then
rm -i $file > /dev/null
echo "$?"
echo "$file has been deleted"
fi
done
Been trying to learn shell scripting for a week or so now, when i run the script it doesnt display an error message, seems like it runs fine, however it doesnt delete... (10 Replies)