10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
In a python script I have 2 files printing side by side on the same line. I want to have 1 of the files to be already displayed at once while the other file print down the list in the file and it still will produce new lines. I want to do it like that to reduce printing a lot of lines and... (0 Replies)
Discussion started by: bigvito19
0 Replies
2. 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
3. Shell Programming and Scripting
I have a large XML file that I want to parse, and only print one specific value if two values are met.
This is the code so far:
#!/usr/local/bin/python
import xml.etree.ElementTree as ET
tree = ET.parse('onedb-dhcp.xml')
root = tree.getroot()
# This successfully gets all... (1 Reply)
Discussion started by: brianjb
1 Replies
4. Shell Programming and Scripting
All,
I have a basic buzz program written in python with return function. If i change return with print,it works fine but i want to know whats wrong with return statement.Can anyone help me whats wrong with this
#!/usr/bin/python
def div4and6(s,e):
for i in range(s,e+1):
if... (5 Replies)
Discussion started by: oky
5 Replies
5. Shell Programming and Scripting
Hi all,
i have a task to do with Python and because i'm a beginner on it i would like your help on this.
Create a python script that:
Every hour collect the Temperature (e.g. 29C) and Current Condition (e.g. Clear) from this website wunderground.com/global/stations/54511.html
Create a CSV... (0 Replies)
Discussion started by: ragaga123
0 Replies
6. Programming
I have 2 text files:
cities.txt
San Francisco
Los Angeles
Seattle
Dallas
master.txt
Atlanta is chill and laid-back.
I love Los Angeles.
Coming to Dallas was the right choice.
New York is so busy!
San Francisco is fun.
Moving to Boston soon!
Go to Seattle in the summer.
... (0 Replies)
Discussion started by: pxalpine
0 Replies
7. Shell Programming and Scripting
Hi,
In my file, for few field I have to print the next ASCII character for every character.
In the below file, I have to do for the 2,3 and 5th fields.
Input File
========
1|abc|def|5|ghi
2|jkl|mno|6|pqr
Expected
Ouput file
=======
1|bcd|efg|5|hij
2|klm|nop|6|qrs (2 Replies)
Discussion started by: machomaddy
2 Replies
8. Shell Programming and Scripting
Hi all,
Can any one tell the script to print a line with one bye one character or word..
Ex: Hi every one. How are you all ....
I want to print like...
First it has to print H then sleep some time and i and again sleep and e ... etc
OR
Hi wait some time and every ..... etc
... (7 Replies)
Discussion started by: divya bandipotu
7 Replies
9. Shell Programming and Scripting
hello all
i request you to give the solution for the following problem..
I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print
g
go
goo
goog
googl
google
like this Using unix Shell scripting...
without using... (1 Reply)
Discussion started by: samupnl
1 Replies
10. Programming
Hello, I need to do this in python but I'm just learning py and it's quite urgent.
I have a script I created and need an interactive python script to modify part of a line.
MY SCRIPT
#ligand prep. Uses 'ind' prefix. The initial ligand must be ind.pdb. This
#generates ind.pdbqt.... (0 Replies)
Discussion started by: gav2251
0 Replies