Hello,
I have a .htaccess file as follows... No I want to comment the last line ( in this case.. it may not be a last line for other cases).. please advise how to add a # (comment infront of "Options All -Indexes" not assuming this line to be the last line using sed.
root@server1 # cat... (13 Replies)
Hi all,
I have few question related to Unix environment and commands :
1. what is .chrc file contain and if it is not present then what happens.
2. what is .login file contain,in which dir it is present and what all other uses are their for this file
3. how and who calls .profile when you... (2 Replies)
Hi Friends!!
I want to add a / at the end of a number. for example i have CQ65758 /, in this case i want to shift that backspace one space to the left so the my result becomes CQ65758/.
How can i do that with sed.
Thanks
Adi (3 Replies)
Hi,
I have 3 doubts which I posted it here.
Doubt 1:
I have a file containing data:
22 -73 89 10
99 21 15 -77
23 63 -80 91
-22 65 28 97
I am trying to print the fields in the reverse order and replace every field by its absolute (positive) value
(ie.) I am looking for output:
10... (8 Replies)
Greetings all. :)
I would like to use sed to join all non-blank lines together in a particular file. I was thinking I could do this by simply replacing the terminating, new-line character on every line which is not blank, but I must be missing something in my sed line:
$ sed... (3 Replies)
Please have a look at below examples. Why do these 3 sed commands deliver the same result? Especially, why are there 4 "x" in the result instead of 3?
1.
echo "abc" | sed 's/d*/x/g'
xaxbxcx
2.
echo "abc" | sed 's/d*/&x/g'
xaxbxcx
3.
echo "abc" | sed 's/d*/x&/g'
xaxbxcx
Thanks for... (2 Replies)
Hi,
A basic sed question.
I have a set of files. In each file there is a number that I want replaced. For example, if I run sed I should get the following:
% cat test2.txt
#goofy//171.00
goofy 171.00
% sed -i 's/171/xxx/g' test2.txt
% cat test2.txt
#goofy//xxx.00
goofy xxx.00
... (2 Replies)