Search Results

Search: Posts Made By: asenav1
12,432
Posted By asenav1
ericadm@amxcruas1> /bin/sh ./file.sh ./file.sh:...
ericadm@amxcruas1> /bin/sh ./file.sh
./file.sh: syntax error at line 2: `outputfile="pingtestlog"$' unexpected
ericadm@amxcruas1> cat file.sh
#!/bin/bash
outputfile="pingtestlog"$(date +%Y%m%d)
...
12,432
Posted By asenav1
Thanx! But I got the following error: ...
Thanx!
But I got the following error:

ericadm@amxcruas1> /bin/sh ./pingdate.sh
./pingdate.sh: syntax error at line 2: `outputfile="pingtestlog"$' unexpected
12,432
Posted By asenav1
Ping bash script to file
Hello:

I have this script:

#!/bin/bash
#for loop
for ip in `cat ips`
do
ping $ip | grep "is alive">>pingtestlog
done


And its working properly with this input:

ericadm@amxcruas1>...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 09:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy