[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shell expansion su più righe



Il 18/12/2013 11:00, Gian Uberto Lauri ha scritto:
> Piviul writes:
>  > Ciao a tutti, scusate il sibillino oggetto...
>  > 
>  > Se eseguo il comando seguente in bash ottengo:
>  > 
>  > $ echo "file "{uno,due}.pdf
>  > file uno.pdf file due.pdf
> 
> Hai provato echo -e e le escape dei caratteri di controllo?
> 
> echo -e DELT{a,b,c}"\n" | tr -d " "

che pero' elimina anche eventuali spazi intermedi; magari:

echo -e "\bora tocca a:"{a,b,c}"\n"

> 
> (il tr serve per un blank extra che viene inserito all'inizio di ogni
> riga).
> 


-- 
Hofstadter's Law:
"It always takes longer than you expect, even when you take into account
Hofstadter's Law."


Reply to: