I have those line on a text file
36)
SIGCANCEL
37)
SIGLOST
38)
SIGXRES
39)
SIGJVM1
40)
SIGJVM2
41)
SIGRTMIN
42)
SIGRTMIN+1
43)
SIGRTMIN+2
44)
SIGRTMIN+3
45)
SIGRTMAX-3
46)
SIGRTMAX-2
47)
SIGRTMAX-1
48)
SIGRTMAX
I want to substitute using sed so the lines become
SIGRTMAX-3
SIGRTMAX-2
SIGRTMAX-1
I have tried those commands,but none work
sed s/^[0-9]\)//g
sed s/^[0-9])//g
also using the -e switch produce nothing.
Substitute is not needed, you can simply delete lines starting by a digit :
sed '/^[0-9]/d'
And if you really must use substitution :
sed 's/^[0-9].*//'
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments