How to execute a series of file processing shell commands in a single execution?

75 views Asked by At

I have to process a text file and i have a series of commands to execute it.Now i would like to process it in a single execution.Not sure how this can be achieved.

:1,$:s/\\n        \\"ccl/\rccl/g
:1,$:s/\\n        \\"category/\category/g
:1,$:s/\\n        \\"cci/\cci/g
:1,$:s/"/:/g
:1,$:s/ccl/ /g
:1,$:s/category/ /g
:1,$:s/cci/ /g
:1,$:s/\:/ /g
:1,$:s/\}/ /g
:1,$:s/{/,/g
:1,$:s/\\n/ /g
:1,$:s/\\/ /g
:%s/^\s\+
:1,$:s/         ,        /,/g
:1,$:s/ ,    /,/g
::1,$:s/ , /,/g
::1,$:s/  ,  /,/g
1

There are 1 answers

0
RahulAN On

You can do: import os os.system("command")

or you can make a batch file in windows and give that location there or you can make a script in Linux and give that path there.