Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
there are 3 files as input and you have to convert them to each other by using SED
Temp1file will be converted to Temp2 as given sample outputs after you use your sed command
then
Temp2 will be converted to Temp3 after you use as given sample output after your use sed command.
3. The attempts at a solution (include all code and scripts):
first one is something like cat Temp1 | sed -n '/@/ {N;s......
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Bilkent University, Ankara/Turkey, Bahattin Hoca , system programming
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Moderator's Comments:
Using [CODE] instead of [QUOTE] will not replace text with smileys. It's the button on the right side of the quote bubble.
Also, please use complete english words instead of abbreviations
Hi,
I have files that are named front1.txt to front999.txt. They are all in the same directory. To change "front" to "back", I am doing something like this.
for file in *.txt; do
new=`echo $file | sed 's/^**/back/g'`
mv $file $new
done
My problem is what if files are named... (6 Replies)
I'm trying to replace a date in an XML file that has the format mm/dd/yyyy. I'm using the Unix date function to set up a variable with the current date but, when I try to replace the value in the XML file, the error message says it cannot be parsed. Here is the command I'm using
... (2 Replies)
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)
I am using this concept to fetch value of IP address after node= in this line of csv text:
a="Measurement:,OutInviteResponseTime,Sessionid=1860700092328051458,node=67.178.40.168,nodeName=abcd,protocol=GK,25523000"
echo $a | sed 's/.*node=\(.*\).*/\1/'
But this outputs:
... (10 Replies)
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)
Hi
I have a piece of xml that has a pattern like this
<int>159</int><int>30</int>
I want to find this pattern but only substitute the second part of the pattern to {rid1}.
Is that possible in sed ?
Thanks.
---------- Post updated at 12:10 PM ---------- Previous update was at 12:01 PM... (11 Replies)
hi all,
I am having trouble finding the right string for this - I dont know whether to use awk or sed..
If I have a file with alot of names and phone numbers like this
McGowan,Sean 978-934-4000
Kilcoyne,Kathleen 603-555-1212
Club603,The 617-505-1332
Boyle,William 301-444-1221
And... (11 Replies)
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)
Hello there,
I need some help.
I have a file containing this :
$ cat file
PARM1=(VAL11),PARM2=(VAL21,VAL22,VAL23),PARM3=(VAL31),PARM4=(VAL41,VAL42)
and I need to replace all the ',' by '|' but only those which are between brackets.
Output would be :... (10 Replies)
Hi,
I have the following string and I need to extract the date from it:
TextHere,2012/07/11,1
I tried using sed:
sed -n 's#^.*\({4}/{2}/{2}\).*$#\1#p'
But it doesn't return anything. The following line doesn't even return '2012':
sed -n 's/^.*\({4}\).*$/\1/p'
I used to use grep -o... (6 Replies)