Skip to content

Instantly share code, notes, and snippets.

@jgwill
Last active December 16, 2020 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgwill/6e333e9b8c14fa28d11fbe9131a7b082 to your computer and use it in GitHub Desktop.
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
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
#!/bin/bash
for f in * ; do echo '![]('$f')'>> index.md ; done
md2html index.md
#!/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