Hi, I am trying to write a script that will replace "PermitEmptyPasswords yes" with "PermitEmptyPasswords no". The following does not seem to work: -
sed 's!/"PermitEmptyPasswords yes"/!/"PermitEmptyPasswords no"/!'
Appreciate any ideas.
Thanks (2 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi,
I have a set of strings in filea.
I want to search string xyz in fileb and replace next line in file b with the content from filea.
#cat filea
abc
def
ghi
#cat fileb
asdkjdslka
sajljskdjoi
xyzjjjjkko
aaaaaaaa
bbbbbbbb
cccccccc
xyzsdsajd
dddddddd
eeeeeeee (2 Replies)
i have few lines in a file... i am reading them in a while loop so a particular line is held is $line1.. consider a modified line is held in $line2.... i want to replace $line1 with $line2 in the same file... how to do it..?
i have come up till the below code
sed "s/$line1/$line2/g" tmpfile.sql... (5 Replies)
Hi experts,
In my text file I have the following alot of lines like below.
input.k is as follows.
2684717 -194.7050476 64.2345581 150.6500092 0 0
2684718 -213.1575623 62.7032242 150.6500092 0 0
*INCLUDE
$# filename... (3 Replies)
I am trying to find a line in a file ("Replace_Flag") and replace it with a variable which hold a multi lined file.
myVar=`cat myfile`
sed -e 's/Replace_Flag/'$myVar'/' /pathto/test.file
myfile:
cat
dog
boy
girl
mouse
house
test.file:
football
hockey
Replace_Flag
baseball
... (4 Replies)
Literally cannot get this one, guys. Single line replacement is simple, but I am not understanding the correct syntax for including a new line feed into the substitution part.
Here's what I got. (Cannot use perl)
#!/bin/sh
set -f
#Start Perms
export HOME=/home/test_user
# End Perms... (6 Replies)
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
I have a file lake this
cat ex1.txt
</DISCOUNTS>
<B2B_SPECIFICATION elem="0">
<B2B_SPECIFICATION elem="0">
<DESCR>Netti 2 </DESCR>
<NUMBER>D02021507505</NUMBER>
</B2B_SPECIFICATION>
<B2B_SPECIFICATION elem="1">
<DESCR>Puhepaketti</DESCR>... (2 Replies)
Have a file in this format This is line one ; line_one
This is line two ; line_two
This is line three ; line_three
This is line four ; line four. I'm trying to make each line a new file called line_one
line_two
line_three
line_four. Tried using split -1 but then I'm back needing to rename... (3 Replies)