erlug
[Top] [All Lists]

[Erlug] dubbio in bash (pipe e commenti)

To: ErLUG <erlug@xxxxxxxxxxxxxx>
Subject: [Erlug] dubbio in bash (pipe e commenti)
From: Francesco Gigli - Checco <jaramir@xxxxxxxx>
Date: Wed, 28 Apr 2004 23:46:07 +0200
salve tutti!

ho un dubbio relativo alla bash, ho googolato, ho letto il man e l'ABS
ma non ho trovato commenti su questa cosa..

se costruisco una pipe tipo questa:

- - - - - -
  INST=$(ls /var/log/packages/$NAME* |\
         sed -e 's!/var/log/packages/!!'|\
         eccetera..)
- - - - - -

e aggiungo molti comandi al posto di eccetera mano a mano diventa meno
leggibile, c'e' un modo per inserire un commento all'interno?

stile:
- - - - - -
  qualcosa               |\
  sed -e 's/\.tar\.gz//' |\ #toglie l'estensione .tar.gz
  sed...                 |\ #fa qualcos'altro
- - - - - -

o devo per forza una cosa di questo tipo:

- - - - - -
  togli_tar_gz="sed -e 's/\.tar\.gz//'"
  ..qualcosa | eval $togli_tar_gz | eccetera..
- - - - - -

sono ben accette anche altre idee :o)

-- 
Francesco Gigli      mail&jabber: jaramir@xxxxxxxx      http://slack.it
             A)bort, R)etry, I)nfluence with large hammer.

<Prev in Thread] Current Thread [Next in Thread>