removing line numbers from the bash history
Posted on September 15, 2011
i set up a server recently, but something got messed up and i had to reinstall, so instead of building it all again by hand, i simply took the contents of the bash history and edited it down to a script that will autoinstall everything in future.
history | sed 's/^ *[0-9]* *//' > serverinstallscript.sh
is the commend needed to remove the lines in front so you can easily create your own bash script...