while loop in csh

This made my day, while loop in one line -one liner- under csh

printf “while ( 1 ) \n df -m \n echo ‘remaining space’ \n  sleep 60 \n end” | csh -f

 Of course, you could install bash but that can make our system vulnerable and also we’d loose the fun of using csh & tcsh

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s