Alan G Isaac wrote:
On Thu, 25 May 2006, "Nikolaos A. Patsopoulos" apparently wrote:
In detail: 1.I want in front of the number in the first column to add "#" , then change line after the value 2. change line after 3rd column 3. change line after 5th column 4. repeat all three steps

%s/^\(\d\+\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s\+\([01]\)\s*/#\1\r\2 \3\r\4 
\5

hth,
Alan Isaac




Thanks for the answer,but sth is not working right. My output is this:


17    1    1    0    0
18    0    0    0    0
19    1    1    1    1
20    1    0    0    0
21    1    1    0    1
22    1    0    0    0
23    0    1    0    0
#24
1 1
1 0
25    1    1    1    1
26    0    0    0    0
27    0    0    0    0

The replacement didn't occur to the whole file.

Thanks,
Nikos

Reply via email to