SurferBob1064
asked on
how do i convert bash script to python script
cat testfile | while read line; do echo this is line nr $line ; done
testfile has line data of :
1
2
3
4
Output:
this is line nr 1
this is line nr 2
this is line nr 3
this is line nr 4
I want the python equivalent of this bash script.
Many thanks
testfile has line data of :
1
2
3
4
Output:
this is line nr 1
this is line nr 2
this is line nr 3
this is line nr 4
I want the python equivalent of this bash script.
Many thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome. And welcome on the Python board ;)
ASKER