Cool.
I'm puzzled by the temporary variable - why not:
echo-literally-helper() { history 1 | perl -pe 's/^ *[0-9]+ +[^ ]+ //' }
$str
echo
Cool.
I'm puzzled by the temporary variable - why not:
echo-literally-helper() { history 1 | perl -pe 's/^ *[0-9]+ +[^ ]+ //' }$str, you can do further string processing on it in any fashion you like. Theechocommand is really a placeholder for "now do stuff of your choice with".