converting a py script to bash
Need help in converting this script to a bash script. here is command
script.sh first_file second_file
here is the python script.
this script is written to dump first_file until it find a specific line then dumps sceond_file until it ends then continues dumping the first file.
f = open(sys.argv[1], "r")
while True:
line = f.readline()
if not line:
break
print line.replace('\n', '')
if (line.find('<PF_B64EN encoding') != -1):
license_file = open(sys.argv[2], "r")
while True:
line1 = license_file.readline()
if not line1:
break
print ("\tlist.append(\"" + line1.replace('\n', '') + "\")")
|