File: rename

package info (click to toggle)
tetex-bin 0.9-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 31,840 kB
  • ctags: 20,484
  • sloc: ansic: 183,676; sh: 7,743; perl: 3,431; makefile: 2,891; pascal: 1,546; yacc: 1,507; cpp: 608; awk: 522; asm: 500; lex: 323; sed: 322; csh: 47
file content (13 lines) | stat: -rwxr-xr-x 195 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /bin/sh
# rename: rename files accoring to expression.
# Copyright 1997 Olaf Weber <infovore@xs4all.nl>
# Public Domain.

expr="$1"
shift

for i
do
	j=`echo "$i" | sed "$expr"`
	mv $i $j
done