Created
March 1, 2018 15:30
-
-
Save AruniRC/17820780bbda41bcee9ed0da77497f4f to your computer and use it in GitHub Desktop.
One-liners in bash that come in handy
This file contains hidden or 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
# A dataset like WIDER-face has folders like: | |
# 0--Parade 21--Festival 33--Running | |
# 45--Balloonist 57--Angler 10--People_Marching | |
# This one-liner splits on '--', takes the second sub-string and gets rid of the '_' | |
# NOTE: example usage of awk | |
ls | awk -F'--' '{printf "%s\n", $2}' | awk -F'_' '{printf "%s %s\n", $1, $2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment