ALYB
November 23, 2021, 11:42am
1
Could someone please help me to find a command line tool that I can use in the Terminal to change a folder with *.tmx files that contain the string:
<tuv xml:lang="en">
The string should become:
<tuv xml:lang="nl">
(Probably it's safe to replace ="en" with ="nl").
Thank you in advance!
We might need more context – what is the pebble embedded in ?
What else is in the string ?
(Signal isn't signal in isolation – only as a difference from a background)
ALYB
November 23, 2021, 1:21pm
3
Hi Rob,
An example can be downloaded here:
Shared with Dropbox
The whole enchilada is here:
Shared with Dropbox
_jims
November 23, 2021, 4:24pm
4
@ALYB , please create a copy of your folder before attempting any file modifications. Once you've done that, open Terminal and move to the directory that contains the files that you want to modify. Then use the following command:
sed -i '' 's/<tuv xml:lang="en">/<tuv xml:lang="nl">/g' *.tmx
3 Likes
ALYB
November 23, 2021, 6:10pm
5
Thank you very much. Because of the size of the files the command took some time, but hey: it worked perfectly.
2 Likes
ccstone
November 23, 2021, 10:53pm
6
Not that I'm opposed to command line tools by any means – but keep in mind that this can be done pretty easily with Keyboard Maestro native tools.
-Chris
2 Likes
Good one, I had no idea about this trick. Make sense if it works pretty well. Thanks!