Created
September 1, 2013 10:55
-
-
Save ekiara/6403720 to your computer and use it in GitHub Desktop.
Getting the last 'n' characters of a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Getting the last 'n' characters of a string | |
# i.e. for getting the last 16 characters of all files (useful when dealing | |
# with Youtube downloads) | |
ls | awk '{print substr($0, length($0) - 15, length($0))}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment