10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Friends
I want to use sed command to pick a part of line. FOr example I only need the
/home_put1/bidds/myfo
part of following line
fish://ulavet@rits1.ula.com.tr/home_put1/bidds/myfo
How can I do this bu using sed command ? (2 Replies)
Discussion started by: rpf
2 Replies
2. 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
3. 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
4. Shell Programming and Scripting
Greetings everyone. Right now I am working on a script to be used during automated deployment of servers. What I have to do is remove localhost.localdomain and localhost6.localdomain6 from the /etc/hosts file. Simple, right? Except most of the examples I've found using sed want to delete the entire... (4 Replies)
Discussion started by: msarro
4 Replies
5. Shell Programming and Scripting
Hi gurus,
I'd like to change this complete line on a file:
BAN_COMMAND="/etc/apf/apf -d $ATTACK_HOST {bfd.$MOD}"
to this one:
BAN_COMMAND="/sbin/iptables -A INPUT -s $ATTACK_HOST -j DROP"
I've tried a lot without any successful . :(
thanks in advance
Israel. (2 Replies)
Discussion started by: iga3725
2 Replies
6. Shell Programming and Scripting
I am working with bash on HP-UX server at school.
As practice for scripting, I am trying to make a pretend server admin script that adds a user to the system, deletes a user from the system, and lists all users of the pretend system. I have accomplished this with a select loop. Adding users, and... (2 Replies)
Discussion started by: masterscout1977
2 Replies
7. Shell Programming and Scripting
Hello
I have a document and in this document I have several occurrence of "VAR == xxxxxxx" and xxxxx can be anything. I don't know what it is. I want to replace the 'xxxxx's with something I know.
What I know however, is the line numbers of the VAR =='s in the file.
How can I replace... (1 Reply)
Discussion started by: alirezan
1 Replies
8. Shell Programming and Scripting
I been trying to get this right. I have trying to get rid of spaces in between the character < and the character >. Everytime I try, sed gets too greedy and do the whole line.
Ex.
< T AG 1> Hello, how are you doing?
<Tag 2> I am doing fine.
I want this:
<TAG1> Hello, how are you... (6 Replies)
Discussion started by: quixoticking11
6 Replies
9. Shell Programming and Scripting
i need to use sed to remove an entire line containing a pattern stored in a variable say $var1
this var1 will be a URL and will therefore contain slashes
any help would be greatly appreciated (1 Reply)
Discussion started by: Fire_Storm
1 Replies
10. UNIX for Dummies Questions & Answers
hi,
i'm trying to erase all the characters after, and including, the first test test
Output: test1 test2 test3
this is what I tried, but didn't work
sed "s/*//" file > testfilename
any suggestions?
thanks,
gammmaman (2 Replies)
Discussion started by: gammaman
2 Replies