Search Results

Search: Posts Made By: mohy
1,653
Posted By Franklin52
I'm not familiar with csh...
I'm not familiar with csh (https://www.unix.com/shell-programming-scripting/153742-csh-programming-considered-harmful.html) but could it be something like?

set $VAR_PRODUCT=`echo $VAR | sed...
1,653
Posted By karthigayan
Try this, var="25x24"; first=`echo $var...
Try this,


var="25x24";
first=`echo $var | cut -d 'x' -f 1`
second=`echo $var | cut -d 'x' -f 2`
let result=$first*$second;
echo $result;
17,017
Posted By ygemici
#!/bin/csh set LIST= ( a b[2"]" c d ) ; echo...
#!/bin/csh
set LIST= ( a b[2"]" c d ) ; echo "$LIST
" >tmpX
foreach ITEM ( `cat tmpX` )
echo "$ITEM"
end
a
b[2]
c
d


regards
@ygemici
17,017
Posted By ygemici
you must not use the either of escape chars at...
you must not use the either of escape chars at the same time

#!/bin/csh
foreach ITEM ( a b\[2\] c d )
echo "$ITEM"
end


or

#!/bin/csh
foreach ITEM ( a "b[2]" c d )
echo...
17,017
Posted By Chirel
hi, like this ? foreach ITEM ( a...
hi,

like this ?


foreach ITEM ( a "b\[2\]" c d )
echo "$ITEM"
end
Showing results 1 to 5 of 5

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