File: fileconvert-v1-to-v2

package info (click to toggle)
etktab 3.2-5
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 492 kB
  • ctags: 1
  • sloc: tcl: 4,103; sh: 15; makefile: 4
file content (17 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

case "$1" in 
    "" | -* )
    echo "Usage:  $0 <filename> [...]"
    exit
    ;;
esac
for i in $* ; do
    if [ -f $i ] ; then
        newname=`echo $i | sed 's/etk$/et6.gz/' | sed 's/etb$/et4.gz/'`
        mv $i $newname
        gzip -d $newname
    else
        echo "No such file \"$i\""
    fi
done