Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to copy/rename (F5/F6) with regex (regular expression) mask all the tagged files or directories with names containing space or á or é characters replaced with underscore and a and e characters?


an á and another á directory name

an á and é file.txt




(mc -V 4.8.1 on Ubuntu 12.04)

share|improve this question
Do you have to do this with mc or would a bash solution be acceptable? – terdon Sep 16 '12 at 12:06
@terdon I wonder if MC has the ability to replace arbitrary characters like perl or sed has with /g (global replace) flag. – rid Sep 16 '12 at 12:17
No idea, I don't use it. Would be happy to give a BASH/find solution if you're interested. – terdon Sep 16 '12 at 12:21
@terdon - Thanks for trying to help. I could write a small user menu script for mc with sed for ex: echo "an á and another á directory name" | sed 's/ /_/g; s/á/a/g; s/é/e/g;' # => an_a_and_another_a_directory_name ...but I would like to find out how to use the regex support bundled in mc for copy/replace functionality. – rid Sep 16 '12 at 13:00

You must log in to answer this question.

Browse other questions tagged .