(Перемещено из вопроса, предназначенного для ответа здесь)
Я нашел ответ на свой вопрос:
#! /bin/csh -f
#----------------------------------------------------------------------
# Script Name: moveme Date: 05/07/96
# Written by: John W. Woolsey Rev: 10/11/99
#
# Description:
# Renames a set of files that contain a particular search string
# to file names that contain a replacement string.
#
# Syntax: moveme
#
# Where:
# is the name of the file name search string.
# is the name of the file name replace string.
#----------------------------------------------------------------------
#
onintr catch
if ($#argv != 2) goto syntax
ls -d *$1* | sed "s/\(.*\)\$1\(.*\)/mv & \1$2\2/" | sh
exit 0
syntax:
echo "Syntax: `basename $0` "
exit 1
catch:
echo "`basename $0` was interrupted or terminated abnormally."
exit 1
Вы смотрели выход в открытый космос? http://spacewalk.redhat.com
Это спутник Redhat, но бесплатный :)
Я использовал его, и им было легко пользоваться, когда вы настроили всю систему.