i run history command and I want to eliminate the list number.
So far this perl script works as long as the list is a exact 3 character
long.
cat dd | perl -pe 's,\d{3},,'
70 export JAVA_HOME=.
81 export JAVA_HOME=.
82 export JAVA_HOME=`pwd`
export JAVA_HOME=`pwd`
export JAVA_HOME=`pwd`
export JAVA_HOME=jdk1.5.0_15/
export JAVA_HOME=`pwd`/jdk1.5.0_15/
historyhistory | grep export
history | grep export
history | grep export > dd
history | grep export > dd
I have tried, but no good.
perl -pe 's,\d{0,3},,'
How would you simply remove the list number?
It does not have to be with perl as I tried and I thought
history -n
will do, but it returns no output
as opposed to my expectation.