10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to remove "forward shash" using sed it was not working
666,server1, 00973 N/A RDF1+TDEV RW 1035788
i need to remove " N/A" and "RW"
I need output
666,server, 00973 , RDF1+TDEV , 1035788 (4 Replies)
Discussion started by: ranjancom2000
4 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have a file containing records of this format. I need to show output of all header of the sets containing recn:rvn records. The sets appear in my file like below.
#set 1
header1:hv1
rec1:rv1
rec2:rv2
rec3:rv3
.......
......
recn:rn
#set 2
header1:hv1
rec1:rv1
rec2:rv2... (3 Replies)
Discussion started by: adurga
3 Replies
3. Shell Programming and Scripting
I have:
2012/01_January/Kite/foldername/otherfoldername/placeholderBlue
I want to end up with:
/foldername/otherfoldername/2012/01_January/Kite/Blue
Basically take everything before the first tab and put it in the place of the consistently named word placeholder and add a slash in place... (2 Replies)
Discussion started by: crowman
2 Replies
4. Shell Programming and Scripting
hi
hope somebody can help, there seems to be bit on the net about this, but still cant make it work the way i need.
i have a file live this
mm dd ff /dev/name1
mm dd ff /dev/name2
mm dd ff /dev/name3
mm dd ff /dev/name4
i need to update /dev/name1 etc to /newdev/new/name1 etc
so... (5 Replies)
Discussion started by: dshakey
5 Replies
5. Ubuntu
Hi,
I am new to linux stuff. I want to use linux iptables to configure rule so that all my incoming traffic with protocol "tcp" is forwarded to the "FORWARD CHAIN". The traffic i am dealing with has destination addresss of my machine but i want to block it from coming to input chain and somehow... (0 Replies)
Discussion started by: arsipk
0 Replies
6. UNIX for Dummies Questions & Answers
i need to replace '/' forward slash with \/(backward slash follwed by a forward slash) using sed command when the forward slash occurs as a first character in a file..
Tried something like this but doesn't seem to work.
find $1 -print0 | xargs -0 sed -i -e 's/^\//\\\//g'
Can someone... (19 Replies)
Discussion started by: depakjan
19 Replies
7. Shell Programming and Scripting
I know you can remove trialing slashes using:
#echo "/tmp/one/two/three////" | sed "s,/$,,"
/tmp/one/two/three///
But I want to know how to make it remove all trialing flashes in the front, and in the start, so the end result is:
tmp/one/two/three
Anyone have any idea how to do this... (6 Replies)
Discussion started by: EXT3FSCK
6 Replies
8. Shell Programming and Scripting
Using the script: (Called replaceit)
#!/bin/ksh
String=$1
Replace=$2
sed -e "s/${orig}/${new}/g" oldfile.txt > newfile.txt
In oldfile.txt, I'm looking for: getenv("Work")
And change it To: /u/web
I execute the script:
replaceit "getenv(\""Work\"")" /u/web
I'm getting sed... (3 Replies)
Discussion started by: gseyforth
3 Replies
9. UNIX for Dummies Questions & Answers
hi all,
im trying to use a sed command to remove all occurenes of \p\g
what i used so far is : sed 's!\p\g!!g' file
but this doesnt work ?
Any ideas, thanks for helping. (2 Replies)
Discussion started by: seaten
2 Replies
10. UNIX for Dummies Questions & Answers
Hey,
This is probably going to sound like an immensely stupid and dull question, but can someone please tell me whether the forward slash on the web address (http://) signifies that it is running on UNIX?
hanks (1 Reply)
Discussion started by: steverocliffe
1 Replies