Created
October 24, 2019 17:51
-
-
Save mdukat/7bb750726a9a85acf27ec75fab1d0ac6 to your computer and use it in GitHub Desktop.
Quick sed example of \1, \2, etc
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
#!/bin/bash | |
# \(.\) matches one character, which will be available by \1 | |
# \(.*\) matches one or more characters, which will be available by \1 | |
# & places whole input, without changes | |
ls Lolishit* | sed 's/ /\\ /g' | sed 's/\(.*\)-.*$/mv & \1.flac/' | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment