10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am unable to loop print a python string array in my unix shell script:
~/readarr.sh '{{ myarr }}'
more readarr.sh
echo "Parameter 1:"$1
MYARRAY= $1
IFS=
MYARRAY=`python <<< "print ' '.join($MYARRAY)"`
for a in "$MYARRAY"; do
echo "Printing Array: $a"
done
Can you... (10 Replies)
Discussion started by: mohtashims
10 Replies
2. Shell Programming and Scripting
i=0
while
do
sizesfor0=`cat 16 | grep 'pickSize' -A 1 | grep '_sz' | cut -d'_' -f1`
sizesfor0=${sizesfor0//id=\"lll/:}
IFS=: array0=( $sizesfor0 )
echo ${array0}
i=$(( $i + 1 ))
done
So, right now I have two variables in the while statement above
sizesfor0 and array0
The... (1 Reply)
Discussion started by: phpchick
1 Replies
3. Shell Programming and Scripting
echo $result=exec("./permit.sh".$_FILES);
pls suggest some other method to run shell script in php .:wall::mad: (0 Replies)
Discussion started by: upvan111
0 Replies
4. Shell Programming and Scripting
I have a task. The scenario is like this. I have a operation program (OPR1) , whose function is to simply double the (single)value it receives as input.
I have to write a script to operate the OPR1 and save its output in a file.
Later, I have to modify the script so as to be able to operate ... (0 Replies)
Discussion started by: animesharma
0 Replies
5. UNIX for Dummies Questions & Answers
Hey all,
How do I make a script print its arguments in reverse order?
Thanks (5 Replies)
Discussion started by: unclepickle1
5 Replies
6. Shell Programming and Scripting
Let's say I want to print the arguments $4 till $#, how can I do this?
$# contains the number of arguments
$@ contain all the arguments as string
What i need is something like
for i in $4_till_$#; do
#do something with $i
convert $i ~/$output
done
The first 3 arguments are used as options... (6 Replies)
Discussion started by: hakermania
6 Replies
7. Shell Programming and Scripting
Hi,
I'm just trying to use a dynamic index for some array elements that I'm accessing within a loop. Specifically, I want to access an array at variable position $counter and then also at location $counter + 1 and $counter + 2 (the second and third array positions after it) but I keep getting... (0 Replies)
Discussion started by: weak_code-fu
0 Replies
8. Shell Programming and Scripting
Hi All,
Shell is ksh
I've given portion of the script here to explain the problem.
It will accept 2 input parameters .
in_file1=$1
in_file2=$2
outbound_dir=/home/outbound
for i in 1 2
do
eval file$i=$outbound_dir/\$in_file$i
eval echo "filename is \$file$i"
... (4 Replies)
Discussion started by: kk17
4 Replies
9. Shell Programming and Scripting
Hi All,
file_1.txt contains
aaa bbbb hhhh
vvvvv mmmmm iiiii
What i want is to search for the first coloumn of each line using awk.i.e as below:
awk '/aaa/ {printf(<>)}' file_1.txt
The print part (<>) should contain all the values(or coloumns ) in the particular line(here it... (8 Replies)
Discussion started by: jisha
8 Replies
10. Shell Programming and Scripting
Hello Guys,
I'm new to Shell scripting, and i need someone to help me with this issue:
I'm trying to do a dynamic update query on Sysbase database table using shell script.
Lets say, the Update query is "update Table set id=X" , where X is dynamic value for the loop index.
If the loop is... (10 Replies)
Discussion started by: Alaeddin
10 Replies