#!/bin/bash
printf "%05d %07d\n" $((0x${1::5})) $((0x${1:5:5}))Usage example:
$ ipui-to-ipei.sh 001bf582ab
00447 0361131
Get IPUI on Gigaset phone:
Menu -> *#06# -> first line
#!/bin/bash
printf "%05d %07d\n" $((0x${1::5})) $((0x${1:5:5}))

mkdir ~/bin wget http://subdl.googlecode.com/svn/trunk/subdl -O ~/bin/subdl chmod +x ~/bin/subdl
cat > ~/bin/mplayer-sub.sh << EOF #!/bin/bash [[ -z "\$@" ]] && exit 0 interactive=""; if [[ "\$1" == "-i" ]]; then interactive="-i"; shift; fi for file in "\$@"; do echo \$file; subdl \$interactive "\$file"; done mplayer "\$@" EOF chmod +x ~/bin/subdl
mplayer-sub.sh Once.Upon.a.Time.S02E12.HDTV.x264-LOL.mp4или так
mplayer-sub.sh ~/Video/Once.Upon.a.Time.S02E12.HDTV.x264-LOL.mp4или да же вот так
mplayer-sub.sh ~/Video/Once.Upon.a.Time.*.mp4В последнем примере наш скрипт скачает субтитры на английском языке (это язык по-умлочанию для subdl, разумеется можно поменять) для всех видеофайлов подпадающих под шаблон Once.Upon.a.Time.*.mp4 и затем добавит их в плейлист mplayer-а. Удобно, неправда ли? :)
Do you like to watch movies with subtitles? I do like it very much and to be honest I've got tired to download them each time. Wouldn't it better if you could just click and go? There is a way. I'd like to share.
mkdir ~/bin wget http://subdl.googlecode.com/svn/trunk/subdl -O ~/bin/subdl chmod +x ~/bin/subdl
cat > ~/bin/mplayer-sub.sh << EOF #!/bin/bash [[ -z "\$@" ]] && exit 0 interactive=""; if [[ "\$1" == "-i" ]]; then interactive="-i"; shift; fi for file in "\$@"; do echo \$file; subdl \$interactive "\$file"; done mplayer "\$@" EOF chmod +x ~/bin/subdl
mplayer-sub.sh Once.Upon.a.Time.S02E12.HDTV.x264-LOL.mp4or
mplayer-sub.sh ~/Video/Once.Upon.a.Time.S02E12.HDTV.x264-LOL.mp4or even
mplayer-sub.sh ~/Video/Once.Upon.a.Time.*.mp4In the last example it downloads English subtitles (English is default for subdl and can be changed) for all of the files those match Once.Upon.a.Time.*.mp4 and then mplayer plays them all.