Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # BusyBox's 'cat' can't do '-n'
- ##cat -n "${HOME}"/.ash_history
- history_file=`ls -t -d "${HOME}"/.*_history 2>/dev/null | head -1`
- if [ ! -z "${history_file}" ]; then
- ## sed "=" "${history_file}" | sed 'N;s/\n/\t/'
- sed "=" "${history_file}" | sed 'N; s/^/ /; s/ *\(.\{6,\}\)\n/\1 /'
- else
- printf "%s: error: shell history file cannot be found\n" `basename "${0}"`
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement