Do it with all : diwa

 

Status : Incomplete 

Statement : diwa is a script that execute a set of commands repeatably.

Well the idea of diwa, i got form my small script which is meant for copying all pdf files or removing all exe files from a given folder.


mkdir ../allpdf;find -name '*.pdf'|while read Filename ; do cp "$Filename" ../allpdf/ ; done 

 Click here to know "more details"

With the help of diwa this command will be

$ mkdir ../allpdf

$ diwa  -d ./ -m *.pdf  -e cp FILENAME ../allpdf


for removing all exe files 

$ diwa  -d ./ -m *.exe  -e rm FILENAME

 

for displaying removing exe files

$ diwa  -d ./ -m *.exe  -e echo FILENAME


for converting all .jpg files to .pdf

$ diwa  -d ./ -m *.jpg  -e convert FILENAME FILENAME.pdf


                   I am very busy,, you take it as assignment and do it,, give initial code...I will modify and upload,, or do it perfectly ..
 

 

See