B
bytebro
Hello,
I have been through "perldoc perlop", and the FAQ, and I'm still
struggling with this, so I'd appreciate any tips.
I've got a whole bunch of C source files, almost all of which refer to
types of the form "uint_8t", "uint_16t", and so on. I need to replace
every one of these occurrences with the (allegedly standard) form
"uint8_t", "uint16_t", and so on, respectively.
My best effort so far is:
perl -i.old -wne 's/uint_(\d+)t/uint$1_t/g' filename.c
But this simply renames filename.c to filename.c.old and outputs
nothing at all to filename.c, and is thus less than completely useful.
Please somebody take pity and explain what I am doing incorrectly!
Thx
klw
I have been through "perldoc perlop", and the FAQ, and I'm still
struggling with this, so I'd appreciate any tips.
I've got a whole bunch of C source files, almost all of which refer to
types of the form "uint_8t", "uint_16t", and so on. I need to replace
every one of these occurrences with the (allegedly standard) form
"uint8_t", "uint16_t", and so on, respectively.
My best effort so far is:
perl -i.old -wne 's/uint_(\d+)t/uint$1_t/g' filename.c
But this simply renames filename.c to filename.c.old and outputs
nothing at all to filename.c, and is thus less than completely useful.
Please somebody take pity and explain what I am doing incorrectly!
Thx
klw