191 reputation
3
bio website
location
age
visits member for 2 years, 8 months
seen Mar 14 at 20:28

Aug
22
comment Bash shell script to locate and remove substring within a filename
@Stu: He means like the following: clean=$(echo "${cfile}" | perl -nl -e "/(.*)([Ss][0-9]+[Ee][0-9]+).*(\.$outext)/ && print \$1 . \$2 . \$3"). (Notice the backslash before the perl $1, $2, ... variables). If I rememeber perl correctly, if you want the whole expression to be case insensitive, (for example, to have a case insentive match against $outext) you can add the letter i after the second forward slash, and then you don't need to replace S and E with [Ss] and [Ee] respectively.