I want to efficiently do the following on the tcsh in Linux.
somecommand a;
somecommand b;
somecommand c;
If I do somecommand {a,b,c}, this does somecommand a b c, which is not what I want. Is there a way to do what I want?
...
I am trying to write a C shell equivalent script for the bash script mentioned here.
This is what I have :
#! /bin/tcsh
set now=`date +%Y%m%d%H%M.%S`
if (( ! -f "./cache" ) || (-n "`find ./monme -newer ./cache`" ))
then
touch cache -t "$now"
echo "new files added" | mail -s "new build" [email protected]
endif
and this i...
I thought C shell script will behave like C and use short circuit evaluation for logical operators.
if ((! -e $cache ) || ("`find $monitor -newer $cache`" != "")) then
...
endif
But in the if statement, even if the first condition is true, the second is checked giving me errors.
Do we have a short circuit logical OR in C shell script...
I have a process monitor script, procer, that runs as root and launches child processes and then chroots them to become my user and drop priviledges. This all works nicely. The problem I am having though is that I prefer to use tcsh rather than bash for normal day to day command line activities (in Snow Leopard), but the aforementioned (...
hello everyone I have 3 files:
engine script
#! /bin/tcsh -f
cat $1 |./hello
hello script
#! /bin/tcsh -f
set line1 = ($<)
while (${#line1} != 0)
set line2 = ($<)
set first1 = $line1[1]
set first2 = $line2[1]
if( $first1 == $first2) then
echo $first1 $line1[2] $line2[2]
set line1 = ($<)
els...
How do I see the current version of tcsh is running in my unix terminal?
...
Hi, I've been trying to find a workaround to defining lists of sequential numbers extensively in tcsh, ie. instead of doing:
i = ( 1 2 3 4 5 6 8 9 10 )
I would like to do something like this (knowing it doesn't work)
i = ( 1..10 )
This would be specially usefull in foreach loops (I know I can use while, just trying to look for an a...