File: translatechars

package info (click to toggle)
fvwm-crystal 3.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 21,708 kB
  • sloc: sh: 3,265; cs: 1,335; python: 875; makefile: 214
file content (12 lines) | stat: -rwxr-xr-x 385 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

if [ "$1" != "$(echo "$1" | tr '[\!\-(){}]\?]\^\`\=\|\&\%\#\*\\\@\"\|\,\;\:]' '_')" ]; then
    mv "$1" "$(echo $1 | tr '[\!\-(){}]\?]\^\`\=\|\&\%\#\*\\\@\"\|\,\;\:]' '_')";
fi

#if [ "$1" != "$(echo $1 | tr '[\!\-(){}]\?]\^\`\=\|\&\%\#\*\\\@\"\|]' '_')" ]; then
#    echo "$1"; 
#    echo $1 | tr '[\!\-(){}\?\^\`\=\|]\&\%\#\*\\\@\"\|]' '_'
#fi

#echo $1 | tr '[cntrl]' _;