Last active
December 16, 2020 11:09
-
-
Save jgwill/6e333e9b8c14fa28d11fbe9131a7b082 to your computer and use it in GitHub Desktop.
BASH Script appending suffix to each file in current dir to a target dir 2012160339 & related
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
td=/a/lib/results/_comparer_it-135k-300k-model_gia-young-picasso-201210_new | |
ext=jpg | |
suffix="-300k" | |
for f in x*1k* ; do ft=${f%.*} ;echo "cp $f $td/$ft$suffix.$ext" ; done |
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 | |
for f in * ; do echo '![]('$f')'>> index.md ; done | |
md2html index.md |
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 | |
p=$1 | |
suf=$2 | |
for f in *$p ; do ft=${f%.*};ext="${f##*.}" ;cmd="mv $f $ft$suf.$ext" ; echo "$cmd" ; $cmd ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment