10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I want to know the working of & here step by step using sed command. (1 Reply)
Discussion started by: Preeti07
1 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I can't seem to understand what the sed and & do.. Why is the set of numbers appear twice ? how the command really work ?
echo "123 abc" | sed 's/*/& www &/'
Output:
123 www 123 abc (3 Replies)
Discussion started by: uniran
3 Replies
3. Shell Programming and Scripting
I am searching for a specific pattern and replacing with ( ) for matched pattern .I am not getting the expected result .....
Here is the file
cat test
cool
change
Frinto Francis
Frinto cool
change Attitude
/usr/bin
sed 's/*/( & )/' test
( cool )
( change )
( )Frinto Francis... (2 Replies)
Discussion started by: frintocf
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Can anyone let me know the difference between awk and sed utilities in Unix?
Many thanks. (2 Replies)
Discussion started by: venkatesht
2 Replies
5. Shell Programming and Scripting
Hello everyone,
i wonder if someone could give me an advice regarding the following problem using sed.
Given ist a structure as shown below:
<aaa>text1<b>text2</b>text3<c>text4</c>text5</aaa>
Now I want to change the outer tag from "aaa" to "new" and replace all tags inside the outer tags... (4 Replies)
Discussion started by: Donaldinho
4 Replies
6. Shell Programming and Scripting
Hi.
I'm going to learn scripting and i have the following topics on the list: sed, awk, shell scripting, perl.
My question is, whehter i should learn sed and awk? Aren't this tools outdated?
Although i see that GNU upgrade it's versions of these tools from time to time.
And, the next... (9 Replies)
Discussion started by: kukuruku
9 Replies
7. Shell Programming and Scripting
How do I grab the first 10 characters of a line and append it to another empty file? (7 Replies)
Discussion started by: xgringo
7 Replies
8. Shell Programming and Scripting
Hi,
$ echo 1 titi | sed -e "s/1/$(echo \&)/"
1 titi
but
$ echo 1 titi | sed -e "s/1/$(date \&)/"
date: invalid date `&'
titi
how can i do for handle '\&' with date ?
Thx (7 Replies)
Discussion started by: sncr24
7 Replies
9. Shell Programming and Scripting
Hi,
Below is a small piece of my Korn shell script - what i am trying to do is substitute all occurrences of the word given by the ${src} parameter with the word given by the ${dest} parameter in that particular textfile. But i get the errors below...
for i in `ls... (19 Replies)
Discussion started by: n8575
19 Replies
10. Shell Programming and Scripting
I have a question. Take the following statement
awk -F\| '{print $21}' testfile | sed 's/\//\\/g' > newfile
This will grab the 21st column of a | delimited text file, replace the forward slashes "/" , with back slashes "\", and redirect the output newfile. Now, how do I get the output... (4 Replies)
Discussion started by: shimb0
4 Replies