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

Re: shell tr command



Luca scrisse in data 04/12/2013 09:40:
Non sono un espertissimo ma potrebbe essere che usano versioni di shell diverse i diversi PC ?!?!?
beh è la prima cosa che ho guardato ;) Ad esempio su un pc:

$ $SHELL --version && echo c0i1a2o3 | tr -d [0-9]
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ciao


e su un altro:
$ $SHELL --version && echo c0i1a2o3 | tr -d [0-9]
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
c0ia2o3

A me sembra strano anche se come dico la sintassi non è da man. Sono entrambi old-stable.

In realtà le espressioni regolari in tr mi funzionano dappertutto tranne in quel pc che ha oldstable (ma probabilmente una configurazione diversa)

Ciao e grazie

Piviul


Reply to: