mirror of
https://github.com/cheat/cheat.git
synced 2024-12-18 18:55:06 +01:00
Update tr
This commit is contained in:
parent
8eda2266bc
commit
91c28712e6
@ -1,5 +1,5 @@
|
||||
#replace : with new line
|
||||
echo $PATH|tr ":" "\n" #equivalent to:
|
||||
echo $PATH|tr ":" "\n" #equivalent with:
|
||||
echo $PATH|tr -t ":" \n
|
||||
|
||||
#complement "aa"
|
||||
@ -11,7 +11,7 @@ echo aabbccd |tr -c "aa" 1
|
||||
echo aabbccd |tr -c "ab\n" 1
|
||||
#output: aabb111 with new line
|
||||
|
||||
#preserve all alpha(-c),sequeeze mode instead of character mode
|
||||
#Preserve all alpha(-c). ":-[:digit:] etc" will translate to "\n". sequeeze mode.
|
||||
echo $PATH|tr -cs "[:alpha:]" "\n"
|
||||
|
||||
#ordered list to unordered list
|
||||
|
Loading…
Reference in New Issue
Block a user