Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert this script to python

Status
Not open for further replies.

cognos11

MIS
Nov 19, 2003
40
US
Hi everyone
I havent used python before and in my organization i the standard scripting is python.

I just started learning python and since i am running out of time to meet the deadlines i would appreciate if anyone could give me an equivalent python script for the unix script below.


This is one checks for the lines containing '7898-9865-9888-0000' and outputs that to another file

1)grep "[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]" inputfile.txt > outputfile.txt


This one is a simple conversion of ebcidic file to ascii with a record lenght of 152.
2)dd if=/Files/incoming.txt cbs=152 conv=ascii of=/Files/incoming/file.ascii
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top