|
|
|
|
||||||
| comp.unix.shell Using and programming the Unix shell. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I'm dumping the content of a file that is white-space field
separated. Each line has varying number of fields. Can I use 'cut' to remove certain fields, say the first to fields, and print the other fields? ....|cut -d\ -f1-2 Does the opposite of what I want it to do. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 5 Mar 2007 21:12:34 -0800, AyOut
<morty3e@gmail.com> wrote: > > > I'm dumping the content of a file that is white-space field > separated. Each line has varying number of fields. Can I use 'cut' > to remove certain fields, say the first to fields, and print the other > fields? > > ...|cut -d\ -f1-2 > > Does the opposite of what I want it to do. > cut -d\ -f3- -- If you fail to plan, plan to fail. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Tue, 6 Mar 2007 01:55:18 -0500, Bill Marcum
<marcumbill@bellsouth.net> wrote: > > > On 5 Mar 2007 21:12:34 -0800, AyOut > <morty3e@gmail.com> wrote: >> >> >> I'm dumping the content of a file that is white-space field >> separated. Each line has varying number of fields. Can I use 'cut' >> to remove certain fields, say the first to fields, and print the other >> fields? >> >> ...|cut -d\ -f1-2 >> >> Does the opposite of what I want it to do. >> > cut -d\ -f3- > Oops, there should be two spaces after \. -- Bloom's Seventh Law of Litigation: The judge's jokes are always funny. |
|
![]() |
| Outils de la discussion | |
|
|