"ex" does the job too, but perhaps not exactly as you want :

 ex -e '%g/&$/j' filename

where "filename" is the name of the file containing your stuff.

NB 1. Difference : it is not entirely batch mode, since you enter
in interactive mode and have to quit with "x" (or wq).

NB 2. I obtain spaces between your "&" :

0382 ABCD & TRCD & UTNB
9456 YRFD
8345 YSSW & LOPI
3384 QAIK & NBVC & POIJ & TDDC

-- 
Christian CLERCIN    |  Villa KAY Ampopoka  BP 1449
                     |  Fianarantsoa 301 - MADAGASCAR
Tél. + Télcp :       |  Mél : [EMAIL PROTECTED]
(261) 20 75 510 19   |  [EMAIL PROTECTED]


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to