#!/bin/bash cd photoappend l=$(ls) for s in $l do x=$s y=$(echo $x | sed 's/_//g') y=$(echo $y | sed 's/-//g') if [ $x != $y ] then mv $x $y fi done
#!/bin/bash cat graphs.tex | sed 's/\\includegraphics\[width=\\textwidth\]{\.\/google\/.*}/\L&/g' > graphs2.tex cat graphs.tex | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(-\)\(.*\)\(.jpg\}\)/\1\2HALLO\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(_\)\(.*\)\(.jpg\}\)/\1\2HALLO\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(_\)\(.*\)\(.jpg\}\)/\1\2HALLO\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(-\)\(.*\)\(.jpg\}\)/\1\2HALLO\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(_\)\(.*\)\(.jpg\}\)/\1\2HALLO\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(.jpg\}\)/\L&/g' > graphs3.tex
#!/bin/bash #cat graphs.tex | sed 's/\\includegraphics\[width=\\textwidth\]{\.\/google\/.*}/\L&/g' > graphs2.tex #cat graphs.tex | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(-\)\(.*\)\(.jpg\}\)/\1\2x\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(_\)\(.*\)\(.jpg\}\)/\1\2x\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(_\)\(.*\)\(.jpg\}\)/\1\2x\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(-\)\(.*\)\(.jpg\}\)/\1\2x\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(_\)\(.*\)\(.jpg\}\)/\1\2x\4\5/g' | sed 's/\(\\includegraphics\[width=\\textwidth\]{\.\/google\/\)\(.*\)\(.jpg\}\)/\L&/g' > graphs3.tex cat graphs.tex | sed 's/\(printf\)\(.*\)\(\\begin{verbatim}\)\(.*\)\("\)\(.*\)/\printf BITTE IM PDF NACHGUCKEN/g' > graphs2.tex cat graphs2.tex | sed 's/\(\\begin{verbatim}\)\(.*\)\("\)/\\begin{verbatim}\2\textbackslash end{verbatim}/g' > graphs3.tex #cd ./google #l=$(ls) #for s in $l #do # x=$s # y=$(echo $x | sed 's/_//g') # y=$(echo $y | sed 's/-//g') # y=$(echo $y | sed 's/.*/\L&/g') # if [ $x != $y ] # then # mv $x $y # fi #done #cd ..
#!/bin/bash cd ./google l=$(ls) i=0 for s in $l do if [[ $(file -b $s) =~ PNG ]] then #i=$(($i+1)) #str=$(echo $s | sed 's/\(.*\)\(\.jpg\)/\1.png/g') #t=$(echo $str | sed 's/\(.*\)\(\.png\)/\1.jpg/g') t=$(echo $s | sed 's/\(.*\)\(\.png\)/\1.jpg/g') echo $t $s #mv $s $str cat ../graphs.tex | sed "s/$t/$s/g" > ../graphs2.tex mv ../graphs2.tex ../graphs.tex fi done echo $i cd ..