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. Programming
My issue :
I am getting only last command output data in ouput file. Though comamnd "print(output)" displays data for all 3rd column values but the data saved in file is not what required it hs to be the same which is being printed by command"print(output)".
Could you please help me to fix this,... (0 Replies)
Discussion started by: as7951
0 Replies
3. Shell Programming and Scripting
I am trying to loop through lots and lots of folders and use the names of the folders to run a Python script which has parameters.
E.g.
-- setup_refs -n John -f England/London/Hackney/John -c con/con.cnf
Normally to run `setup_refs` once from command line it's: `python setup_refs.py -n John... (3 Replies)
Discussion started by: Mr_Keystrokes
3 Replies
4. Shell Programming and Scripting
Hello all,
Not sure if this question has been answered already.
I have some xml Element variable as below:
child19 = core_elem_dcache.find('stat')
child20 = core_elem_dcache.find('stat')
child21 = core_elem_dcache.find('stat')
child22 = core_elem_dcache.find('stat'Next I... (2 Replies)
Discussion started by: Zam_1234
2 Replies
5. Shell Programming and Scripting
Here's my code:
awk -F '' 'NR==FNR {
if (/time/ && $5>10)
A=$2" "$3":"$4":"($5-01)
else if (/time/ && $5<01)
A=$2" "$3":"$4-01":"(59-$5)
else if (/time/ && $5<=10)
A=$2" "$3":"$4":0"($5-01)
else if (/close/) {
B=0
n1=n2;
... (2 Replies)
Discussion started by: klane
2 Replies
6. Shell Programming and Scripting
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to run a do while for an array. And in the do while, I'm trying to get a user response. Depending on the the answer, I go ahead and do something or I move on to next element in the array.
So far I can read the array, but I can't get the if statement to work. Any suggestions... (5 Replies)
Discussion started by: nitin
5 Replies
8. Programming
I have a 2 d array that I need to loop through and check for a specific value in each variable...
Im a little confiused on how to do this...
#include stdio.h
#include string.h
main ()
{ char arrary;
memset(array,' ',sizeof(array));
for ?????
{ if ( array == ' ' )
{ do... (2 Replies)
Discussion started by: trey85stang
2 Replies
9. Shell Programming and Scripting
Hello, I wrote the following in python that parses mathematical expressions and I'm trying to store the results in an array. For example, if I enter 3+4*2, the array should be . Unfortunately, I get the following:
Can anyone help me figure out what is wrong? The tokenizer seems to work... (0 Replies)
Discussion started by: jl487
0 Replies
10. UNIX for Dummies Questions & Answers
Hi
I have something like
cat $HOME/all_dirs | while read ln_old_dirs
do
if
then
echo "$ln_all_old_dirs"
fi
done
As you know that the variable ln_all_old_dirs is not accessable from outside the... (2 Replies)
Discussion started by: ssuresh1999
2 Replies