Code: Select all
#!/bin/csh -f
...
foreach i (`cat /home/user/systems.txt`)
$ping $i > /dev/null
if $status != 0 continue
/bin/echo $i >> /home/user/lservers
end
...
What is the problem?
Code: Select all
#!/bin/csh -f
...
foreach i (`cat /home/user/systems.txt`)
$ping $i > /dev/null
if $status != 0 continue
/bin/echo $i >> /home/user/lservers
end
...
A potentially much more informative question is: what have you been able to rule out, based on the research you've done so far?cmorris14 wrote:What is the problem?
+1 loldasein wrote:Another homework problem successfully answered.
Yeah, LOL, spamming threads can be funny...aicardi wrote:+1 loldasein wrote:Another homework problem successfully answered.
It was not clear (at the moment when I've written a reply) whether cmorris14 is going to use original file with shebang or not. The error message shows, that He's not using shebang, and therefore my previous reply is valid. So It's also obvious, that I think that Your reply is nothing more than trolling.runfrodorun wrote:But better yet, your initial answer is wrong.
#!/bin/csh
specifies that the script is to be run with csh regardless of the interactive shell that the user has chosen. A simple google search and a brief test will show this... and the people reading this thread will see you being incorrect and needlessly confrontational.