10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Unix Experts :),
Below is a small section of a large file with the following list:
1. Starts with string " interest" as the heading
2. Followed by a list of activities
3. Ends with a blank line before starting with another different list.
E.g.
Sporting interest
football... (13 Replies)
Discussion started by: gjackson123
13 Replies
2. Shell Programming and Scripting
how to use sed to put .txt end of line..my input file below
file1
make=^bak12^".
DEV=LONG^cmd/usr/bak/ade4^"
.....................................
file 2
make=^and_LONG/bak12^".
DEV=LONG^cmd/usr/bak/ban3^"
..........................................
file 3... (6 Replies)
Discussion started by: zulabc
6 Replies
3. Shell Programming and Scripting
All:
Can somebody help me out with a sed command, which removes the the first occurance of ')' until the end of the line
If I have the following input
... (5 Replies)
Discussion started by: BeefStu
5 Replies
4. UNIX for Dummies Questions & Answers
Hello Friends, How can I remove the last two values of this line using sed
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638:9/3/90:45900
The result should look like this:
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638 (3 Replies)
Discussion started by: humkhn
3 Replies
5. Shell Programming and Scripting
Hi !
I'm rather new with sed ... learned a lot already by googling etc ...
The following script should replace all spaces and ends-of-lines with "something (see below).
#!/bin/bash
i=0
while read line
do
fam="H`printf "%06d" $i`"
echo $line | sed -e 's//\t'$fam'\n/g'
i=$(($i+1))... (7 Replies)
Discussion started by: jossojjos
7 Replies
6. Shell Programming and Scripting
Hello All,
I have a doubt in sed, i want to add some parameter at the end of the tag inside a xml tag. how to i do that. so i want to add Results="true" value="high" inside the xml tag.
Orignal
<execute description="reboot">
<execute description="Stop Servlet">
After adding the... (5 Replies)
Discussion started by: asirohi
5 Replies
7. Shell Programming and Scripting
Example,
Trying to replace text to the end of a line.
Text file looks like this
PP= 4
PP= 412
PP= 425
I want to replace only the following line:
PP= 4
with
PP= 2
How can this be done with sed? (3 Replies)
Discussion started by: hanson397
3 Replies
8. UNIX for Dummies Questions & Answers
This is the line that I am using:
sed 's/^*\({3}*$\)/\1 /' <test.txt >results.txt
and suppose that test.txt contains the following lines:
http://www.example.com/200904/AUS.txt
http://www.example.com/200903/_RUS.txt
http://www.example.com/200902/.FRA.txt
What I expected to see in results.txt... (6 Replies)
Discussion started by: figaro
6 Replies
9. Shell Programming and Scripting
I have a file with a bunch of similar lines in which I want to extract a phrase delimited by the first occurance of a '>' at the beginning and the first occurance of a '<' at the end (you might have guessed these are beginning/end of HTML tags). Using Sed I have managed to delete up to and... (7 Replies)
Discussion started by: coldcanuck
7 Replies
10. UNIX for Dummies Questions & Answers
Anyone know how to use SED to append a comma to the end of each line
example:
field1,field2,field3,field4
If i Cat /textfile ---- How can i append the end of /textfile with a comman? (8 Replies)
Discussion started by: Redg
8 Replies