Created
September 14, 2016 12:43
-
-
Save fpersson/bd224ec40e509cc8d66da15538dba1b7 to your computer and use it in GitHub Desktop.
Revisions
-
fpersson created this gist
Sep 14, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash #put in $HOME/bin/ OIFS=$IFS NOW=$(date +"%y%m%d") IFS='.' read -r -a array <<< $1 for result in "${array[@]}"; do echo $result done echo ${array[0]} echo ${array[1]} mv $1 ${array[0]}_$NOW.${array[1]} IFS=$OIFS 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #put in ~.local/share/kservices5/ServiceMenus/ [Desktop Entry] Type=Service # all files inherit from application/octet-stream MimeType=application/octet-stream; X-KDE-ServiceTypes=KonqPopupMenu/Plugin X-KDE-Submenu=MiscFiles Actions=addDate [Desktop Action addDate] Name=Add Date Name[sv]=Add Date Icon=utilities-terminal Exec=$HOME/bin/addDate.sh %f