ls -l /home/helix/videos/* | cut -d' ' -f8 | egrep -o '([^/]+$)'
In this example egrep starts from the back of the line and outputs only till ‘/’ appears
This command can replace the basename command for multiple arguments
MAC OS X, Linux, Windows and other IT Tips and Tricks
ls -l /home/helix/videos/* | cut -d' ' -f8 | egrep -o '([^/]+$)'
In this example egrep starts from the back of the line and outputs only till ‘/’ appears
This command can replace the basename command for multiple arguments