%s /$/POS etere/ will get me the commands; however, I want them
all stacked in the same column for readibility.
How could I do that with regular expressions in VI?
Basically, POSTION(XX,,XX) DECIMAL EXTERNAL all in proper column and
then I can clean-up after that.
M_KY_BA POSITION (1,10) DECIMAL EXTERNAL,
M_LOCATION POSITION (10,14) DECIMAL EXTERNAL,
M_PREM_NO POSITION (XX,XX) DECIMAL EXTERNAL,
M_CUST_NO
M_SSN
M_TX_OFFICE
M_DATE_MDY
M_BILL_GR
M_PREV_DATE_MDY
M_BILL_FL
M_SPT_GAS_CTAR
M_NAME1
M_NAME2
M_ADDRESS1
M_ADDRESS2
M_ADDRESS3
M_ADDRESS4
M_MRDG_SEQ_NO
For editor questions comp.editors is more appropriate.
>
> Basically, POSTION(XX,,XX) DECIMAL EXTERNAL all in proper column and
> then I can clean-up after that.
A way to do that formatting in shell with your data...
while read -r M P C rest
do printf "%-20s %-20s %-20s \n" "$M" "$P $C" "$rest"
done <infile >outfile
And you can of course add also the "POS etere" to the end of the
printf format string so you don't need the manual vi'ing.
Janis