Say I write something like the following:
var1=1
var2=2
for int in 1 2
do
echo "\$var$int"
done
I want the output to be:
1
2
Instead I get something like:
$var1
$var2 (2 Replies)
Say I have (in psuedocode)
For i=1 to 10
tar cvfb /... 5*i /junk(i)
end
What I mean is that I want each successive for loop to have the block size parameter be 5 times the current counter. This isn't my actual code, just a stupid example...So the question is how do I descrive that parameter... (2 Replies)
Hello everyone,
My main objective is to search for text within a file, namely a block of text where each line ends with a backslash "\".
However, the block must begin with a keyword, like "loginstring".
Here is an example of a file that contains a block:
###############
loginstring \... (2 Replies)
Hi
I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/
Can anyone please help me on this? (3 Replies)
i am passing input parameter 'one_two' to the script , the script output should display the result as below
one_1two
one_2two
one_3two
if
then
echo " Usage : <$0> <DATABASE> "
exit 0
else
for DB in 1 2 3
do
DBname=`$DATABASE | awk -F "_" '{print $1_${DB}_$2}`
done
fi (5 Replies)
I want to pass this array as a parameter.
IFS=$'\n'
fortune_lines=($(fortune | fold -w 30 ))
Inside of this line
screen -p 0 -S ${SCREEN_SESSION} -X stuff "`printf "say ${fortune_lines}\r"`"
And I am lost at this point.
I am thinking something like this?
Then make it loop..
... (7 Replies)
hi all,
i have a parameter file of following format, i want a method which can get the value of specific parameter.
parameter file format:
<Parameter Name="FileLocationWindows">
<Description>
The directory location of the logger file.
... (1 Reply)
I wrote this script which works well when I manually input 55518622 and 1
but I need this script to be generic and loop over the following table
awk '$4>(55518622-500000) && $4<(55518622+500000)' chr1_GEN2bim | awk 'BEGIN {min=1000000000; max=0;}; {\
if($4<min && $4 != "") min = $4; if($4>max... (8 Replies)
Hi All,
I have created one function for KSH and was running well with one parameter input since I just had to use $1 to get the parameter.
Now I want to do loop for each parameter(actually filenames) . I have try to use do loop, but $i does not resolve to parameter instead it resolves to 1,... (5 Replies)