Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1689

FindReplace in a file

$
0
0
This is an alias that I use from within a .btm file when I want to find and replace text in a text file;
Code:
alias FindReplace=`tpipe /input=e:\cobolscript\cobcal.cbl /output=r:\cobcal.cbl /replace=0,0,0,0,0,0,0,0,0,%1,%2`
FindReplace "CALENDAR USING 2024 12" "CALENDAR USING %_year %_month"
FindReplace "MOVE 2024 TO year" "MOVE %_year TO year"
FindReplace "MOVE 12   TO month" "MOVE %_month   TO month"

I had been using the PSHELL command and Powershell code;
Code:
:: R:\>which psc...

Read more

Viewing all articles
Browse latest Browse all 1689

Trending Articles