Created
September 14, 2016 12:43
-
-
Save fpersson/bd224ec40e509cc8d66da15538dba1b7 to your computer and use it in GitHub Desktop.
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 characters
#!/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 characters
#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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment