[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Editing Problem with bash script and sed

On Tue, Nov 14, 2017 at 11:07:47AM -0500, Thomas George wrote:
> After experimenting with regular expressions with sed I found ls | sed -e
> s/S.*-// reduced the file names in File.txt to just the names of the Carols
> as shown in sed.txt. Used like this sed leaves the original file unchanged.
You probably want the file-rename command from the rename package.  It
is a handy wrapper around the Perl File::Rename module.  It accepts Perl
RE, which is very similar to what you would use with sed.  In fact, that
particular RE that you are using should just work unmodified with



Roberto C. Sánchez

Reply to: