Ordering string of commands in a file
- From: rgompa@xxxxxxxxxxxxxxxxxxxxx (Raghuramaiah Gompa)
- Date: Thu, 29 Dec 2005 16:30:23 +0000 (UTC)
I have a file that has lines like the following:
Titl1=B2a
Command1=c:\chi\cw.exe
Title2=f2a
Directory1=c:\chi
Type1=1
Command2=c:\chi\cw.exe
Directory2=c:\chi
Options2=%@%
Type11=2
Title14=Ma3
Command14=c:\chi\cpb.bat
Options14=c:\temp\temp.bin
Use long names3=1
Title12=Dir
Command12=Tfd
Title13=a2h
Command13=c:\bat\a2h.bat
Options13=%@dpn%
Show13=2
Command31=C:\bat\tview.bat
Use long names31=1
Title31=tview
.....
Basically Title,Command, Show,... constitute a group of commands that are associated with the
name described in Title. Now I want to reorder them in the alphabetical order of names described in
Title. For instance, the new file should have :
Title1=a2h
Command1=c:\bat\a2h.bat
Options1=%@dpn%
Show1=2
and all the lines (Title2=B2a, ..) are changed accordingly (because or the order a2h, B2a, Dir, f2a, Ma3, .... )
How can I achieve this? Please help. .. Raghu
.
- Follow-Ups:
- Re: Ordering string of commands in a file
- From: Dave Weaver
- Re: Ordering string of commands in a file
- From: John W. Krahn
- Re: Ordering string of commands in a file
- From: xicheng@xxxxxxxxx
- Re: Ordering string of commands in a file
- Prev by Date: Re: Addressing the cursor of a VT100 style terminal emulator using perl
- Next by Date: Re: Perldocs for Schwartzian transforms?
- Previous by thread: [FR/EN] how to convert the characters ASCII(0-255) to ASCII(0-127)
- Next by thread: Re: Ordering string of commands in a file
- Index(es):
Relevant Pages
|