hi Guys,
I have a rar file which consists of 10 files. each file has a space in its file name.
how can i replace all spaces with _
i can replace them using sed but the thing is i need to replace using a script and not command.
can anyone help me out??:confused::b:
I have a string of text:
" . .
I'm trying to replace the specific numbers and use this command:
sed -e 's/[0-9]\{12\}/ /g' file.log
but nothing happens. As U can see this expression should replace all numeric occurrences with size of 12 digits, globally and replace it with space. I found out that the {, } symbols should be escaped - weird.
It doesn't work.
Please help.
I have many large Unicode files. I would like to replace each Unicode byte pair with a new Unicode byte pair. For example, the original file contains
"C3 B9 C3 AB C3 B8 C3 B0"
and I would like to replace this with
"D7 A0 D7 A8 D7 9B D7 A9".
hello, I'm trying to write the fastest sed command possible (large files will be processed) to replace RICH with NICK in a file which looks like this (below) if the occurance of RICH is uppercase, replace with uppercase if it's lowercase, replace with lowercase
SOMTHING_RICH_SOMTHING <- replace here
hellorichwhatareyoudoing <- do not replace here, forms part of a word
SOMTHING.RICH.SOMTHING
Hi,
We have a file (e.g. a .csv file, but could be any other format), with 2 columns: the old value and the new value. We need to modify all the files within the current directory (including subdirectories), so find and replace the contents found in the first column within the file, with the contents of the 2nd column
e.g.
Dear Friends,
I am looking for a way how to find and replace a value in two files using a reference a file where are the key to replace.
Basically, I want to keep a copy of the original file and make a new one in order to compare at the end that the change was done whitout change the rest of file..:)
All files are in the same folder.
Then the files are like this
file name = sw1135g.sps
S 265
I'm updating a file in every user profile. The location is fairly deep \profiles\\appdata\roaming\microsoft\imagelogo.jpg and I'm replacing it with a newer file of the same name. I would like to do this for all profiles. Is there a good way to replace all files based on filename?
for example I have a string like "test test test " in a file.
I want to replace the first space with ' 1 ' to make it "test 1 test test test " .
I tried sed -i "s/^\ /\ 1\ /g" text.txt but it will change all spaces to ' 1 ', so I would like to know how to make it only happen on the first found?