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 > Concatenating command output with newlines
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Concatenating command output with newlines

Réponse
 
LinkBack Outils de la discussion
Vieux 24/03/2008, 01h02   #1
David Martin, NolaFlash.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Concatenating command output with newlines

Hi folks,

I am periodically logging the output of ps aux to a file and I want to
tack on a couple newlines but I can't get the command phrased
correctly.

I have tried various ways but most recently:

/bin/cat /bin/ps aux "\n\n" >> /home/foo/ps.log

Also tried

bin/cat | /bin/ps aux . "\n\n" >> /home/nolaflash/ps.log

How is this done correctlty?

TIA!

JG
  Réponse avec citation
Vieux 24/03/2008, 01h14   #2
Janis Papanagnou
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Concatenating command output with newlines

David Martin, NolaFlash.com wrote:
> Hi folks,
>
> I am periodically logging the output of ps aux to a file and I want to
> tack on a couple newlines but I can't get the command phrased
> correctly.
>
> I have tried various ways but most recently:
>
> /bin/cat /bin/ps aux "\n\n" >> /home/foo/ps.log
>
> Also tried
>
> bin/cat | /bin/ps aux . "\n\n" >> /home/nolaflash/ps.log
>
> How is this done correctlty?


One possibility...

{ /bin/ps aux ; echo ; echo ; } >> /home/nolaflash/ps.log


Janis

>
> TIA!
>
> JG

  Réponse avec citation
Vieux 24/03/2008, 03h04   #3
David Martin, NolaFlash.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Concatenating command output with newlines

On Mar 23, 7:14 pm, Janis Papanagnou <Janis_Papanag...@hotmail.com>
wrote:
> David Martin, NolaFlash.com wrote:
> > Hi folks,

>
> > I am periodically logging the output of ps aux to a file and I want to
> > tack on a couple newlines but I can't get the command phrased
> > correctly.

>
> > I have tried various ways but most recently:

>
> > /bin/cat /bin/ps aux "\n\n" >> /home/foo/ps.log

>
> > Also tried

>
> > bin/cat | /bin/ps aux . "\n\n" >> /home/nolaflash/ps.log

>
> > How is this done correctlty?

>
> One possibility...
>
> { /bin/ps aux ; echo ; echo ; } >> /home/nolaflash/ps.log
>
> Janis
>
>
>
> > TIA!

>
> > JG


Thanks!

jg
  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 02h57.


É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,15872 seconds with 11 queries