Hi,
I want to use this simple awk script to rename some files in a directory:
awk '{gsub (\4+\, "_" print}'
which replace every group of character "4" with a single underscore "_". So, for example:
toto4444.txt become toto_.txt
But I don't know how to combine this to use in a shell to do something like this:
mv *.* `the result of the awk expression`
Is it possible? Maybe not!
Thanks for the help
I want to use this simple awk script to rename some files in a directory:
awk '{gsub (\4+\, "_" print}'
which replace every group of character "4" with a single underscore "_". So, for example:
toto4444.txt become toto_.txt
But I don't know how to combine this to use in a shell to do something like this:
mv *.* `the result of the awk expression`
Is it possible? Maybe not!
Thanks for the help