con sed: s = sostituisci g = globale ^ = inizio riga $ = fine riga
$ echo "Xabc-X--Y-defY" | sed 's|^X||' | sed 's|Y$||' | sed 's|-|_|g' abc_X__Y_def Il 18/12/13, onetmt<[email protected]> ha scritto: > 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." > > > -- > Per REVOCARE l'iscrizione alla lista, inviare un email a > [email protected] con oggetto "unsubscribe". Per > problemi inviare un email in INGLESE a [email protected] > > To UNSUBSCRIBE, email to [email protected] > with a subject of "unsubscribe". Trouble? Contact > [email protected] > Archive: http://lists.debian.org/[email protected] > > -- ciao, MaX -- Per REVOCARE l'iscrizione alla lista, inviare un email a [email protected] con oggetto "unsubscribe". Per problemi inviare un email in INGLESE a [email protected] To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/caeyavmtn11o245ekt2unxmtqppnn96suboc-n2frewjkv_5...@mail.gmail.com

