I am writing a script for correcting filenames created by a Unix
application. Currently I am stuck on filenames containing a character I
cannot determine how to rename in the script. The character is ³, small
superfix 3 in the filename. This was originally saved as a degree symbol; I
would like to change it to "_deg".
Filenames examples:
FLGWN_F_0³
FLGWN_F_180³
FLGWN_F_270³
FLGWN_F_]0³
When the listing is output to a file, the result is:
FLGWN_F_0M-3
FLGWN_F_180M-3
FLGWN_F_270M-3
FLGWN_F_]0M-3
In an extended character map this is #179.
To test:
lsf /parts/iso/FLG* | tr "[\179]" "[\150]"
and
lsf /parts/iso/FLG* | awk '{ sub (/\M_3/, "_"
; print }'
Neither does anything to the names.
The desired end result would be to change FLGWN_F_0³ to FLGWN_F_0_deg
Thanks for exploring this with me,
Kirk
application. Currently I am stuck on filenames containing a character I
cannot determine how to rename in the script. The character is ³, small
superfix 3 in the filename. This was originally saved as a degree symbol; I
would like to change it to "_deg".
Filenames examples:
FLGWN_F_0³
FLGWN_F_180³
FLGWN_F_270³
FLGWN_F_]0³
When the listing is output to a file, the result is:
FLGWN_F_0M-3
FLGWN_F_180M-3
FLGWN_F_270M-3
FLGWN_F_]0M-3
In an extended character map this is #179.
To test:
lsf /parts/iso/FLG* | tr "[\179]" "[\150]"
and
lsf /parts/iso/FLG* | awk '{ sub (/\M_3/, "_"
Neither does anything to the names.
The desired end result would be to change FLGWN_F_0³ to FLGWN_F_0_deg
Thanks for exploring this with me,
Kirk