PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > Cut Questoin
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Cut Questoin

Réponse
 
LinkBack Outils de la discussion
Vieux 06/03/2007, 06h12   #1
AyOut
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Cut Questoin

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.

  Réponse avec citation
Vieux 06/03/2007, 07h55   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Cut Questoin

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.
  Réponse avec citation
Vieux 06/03/2007, 17h22   #3
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Cut Questoin

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.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h50.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08789 seconds with 11 queries