1
vote
1answer
119 views

How to “reuse” a regex find and replace in Vim

I have a plain text file with entries as firstAuthorLastName_titleFirstWord_YYYY that I change to firstAuthorLastNameYYYYtitleFirstWord with the following s// command in Vim.^[1] ...
0
votes
1answer
913 views

Add text to beginning and end of each line using batch/cmd

What I'd like to achieve in the end is to generate a text file that lists all *.txt files in the current directory with the path appended to the beginning of the filenames, and some other string after ...
0
votes
1answer
490 views

How can I find and replace multiple blocks of text in multiple documents all at once?

I tried searching for this everywhere but couldn't find any solution. I have 100 html pages with various text to translate. I have also the translated text ready on a word document. So what I have to ...
0
votes
2answers
1k views

Validate IP addresses in user input with batch script

Related: Script to assign and remove arbitrary secondary IPs to an interface I'm trying to augment the script in the above question, by validating the user input so that the script will only ...
1
vote
3answers
971 views

Replace umlauts with regular expressions

I would like to sync several folders on my local Mac with a remote server via SFTP. As the existing umlauts appear to be problematic for my syncing software (Deltawalker), I am looking for a way ro ...
19
votes
10answers
15k views

Renaming many files in Mac OS X, batch processing

I used to rename file in Linux via a rename command: rename 's/old_pattern/new_pattern/g' *glob Is there something similar in Mac OS X (Snow Leopard)?