Hi, I forgot to mention that there are other occurrences of the word libraries and objects, but they are followed by the word 'Location'. For example:
should change to
Sorry for the confusion, I should have been clearer.
Balajesuri's answer works, except it also adds the /pack prefix to the second occurrence of 'libraries.'
Moderator's Comments:
Please wrap all code, files, input & output/errors in CODE tags.
It makes them far easier to read a preserves multiple spaces for indenting or fixed width data.
Last edited by rbatte1; 09-17-2015 at 11:58 AM..
Reason: Code tags
Hi
I am a beginner to sed command, here I have a question about using sed to add a few characters into a token of a string.
For example, I have a file,
sqw:qqq:123124:uiqe
dfd:ccc:12390:dfjis
cde:aaa:21311:dfjsid
and, I want the output to be,
sqw:qqq:123124:uiqe... (4 Replies)
Hello, i'm trying to remove the ./ from this file using this SED command:
sed 's/.///g' all3.lst > all4.lst
Does anyone know the correct format for this?
For example, i'm trying to convert ./_ABMSTR.TXT.out to:
_ABMSTR.TXT.out
Thanks... (11 Replies)
Hi Everybody,
Another headache form myside,
i have a file name noname.txt having content as
CS007=NEW
and i have to write a scipt which will take the parameters as update,delete... with the 1st field of noname.txt (i.e. here CS007)
whose objective is to change the 2nd field of noname.txt... (3 Replies)
I am looking to change a data file into a javascript string and this is the code that I am using:
sed -i '' -e 's/^/str += "/' -e 's/$/";/' file.xml
The first part
-e 's/^/str += "/'
works as intended, but the second part
-e 's/$/";/'
adds an additional newline to my file, so that instead of... (3 Replies)
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
Hi,
I want to add a character "#" in this few lines with sed command
Initial:
### CACCIA: DEBUT ###
if $(grep -wqi "$2" /etc/passwd); then
chuser -R files registry=files $2
fi
### CACCIA: FIN ###
Result with sed command:
### CACCIA: DEBUT ###
#if $(grep -wqi "$2"... (4 Replies)
I have a website. I have a directory within it with over a hundred .html files. I need to change a date within every file. I don't have an easy way to find/replace.
I need to change 10/31 to 11/30 on every single page at once. I tried the command below but it didn't work. Obviously I don't know... (3 Replies)
I have a list of property file can each file has name=value kind of key value pair
can replace all = with say ; in each file using sed or any other command (4 Replies)
Hi,
I am trying to write a script which will email a backup report from the server,
The contents of the email will be:
---------------------- ---- -- ---- ----- ---- ------- ---- ------- -------
| | | | |Chnge|Wkng| | | | |
| ... (6 Replies)
UNIX gurus
I need your help with the following (The server is an AIX box).
I have a text file with the following information:
********************************************************
SOME LINES
case
:WORD1
SOME LINES
:WORD2
SOME LINES
:WORD3
SOME LINES
esac
SOME LINES... (7 Replies)