Search Results

Search: Posts Made By: katrvu
2,973
Posted By katrvu
sed xml challenge
I have a web xml file that looks like this:


<allinfo>
<info>
<a>Name1<\a>
<b>address1<\b>
<c>phone1<c>
<\info>
<info>
<a>Name2<\a>
...
45,094
Posted By katrvu
sed remove everything up to the pattern
I have been search all over the internet to find a solution to this.
I have a file that looks like:

-a ItemConfig.custom=true
-a Config.custom=true
go -t malu
-t Use=true

I want to get...
9,448
Posted By katrvu
ah~u r right, ? also doesnt work. I will try the...
ah~u r right, ? also doesnt work. I will try the long code tonight.
Thank you
9,448
Posted By katrvu
I'm working on Solaris and sed --version does not...
I'm working on Solaris and sed --version does not print anything useful.
I also had the idea of doing something like [ADFJMNOS][aceopu][bcglnprtvy], but it's very risky since I'm edit a database...
9,448
Posted By katrvu
Since I already have sed code for editing other...
Since I already have sed code for editing other stuffs in the file. Using sed would save me many lines of work. I'm not very familiar with awk and cut, but if I still couldn't get sed to work this...
9,448
Posted By katrvu
Backslashes work with the parentheses. However,...
Backslashes work with the parentheses. However, it does not work with \|.
a|b will treat | as a string and a\|b will treat | as special character. but I couldn't find it's meaning in help manual and...
9,448
Posted By katrvu
(Jan or Feb or...) (1 space or two space)...
(Jan or Feb or...) (1 space or two space) ([0-9][0-9] or [0-9]) [12][0-9][0-9][0-9]
Any suggestions? I don't have GNU sed
9,448
Posted By katrvu
Hi era, I still have a problem with removing...
Hi era,
I still have a problem with removing multiple month.
I could get it to remove one month like this:
sed 's/ Ma[ry] [0-9][0-9] [12][0-9][0-9][0-9]//' file
but the or part of...
9,448
Posted By katrvu
sed remove date ex. "Mar 25 2008"
is there any way to remove data out of a file with sed?

sample file:
2 3 414 Mar 25 2008
223 312 4244 Feb 25 2008
5 312 422344 Sept 25 2008

output:
2 3 414
223 312 4244
5 312 422344
1,792
Posted By katrvu
quick sed help
what's the code for delete everything before [ for every line in a file?
Thank you so much
yoyoyo [hello]
sssss [hello]
asdf [hello]
become:
[hello]
[hello]
[hello]
3,253
Posted By katrvu
>where would you want standard output to go? ...
>where would you want standard output to go?
>why do something if you want to suppress its output?

because I want the test output to be in a better format and also don't want to change the file....
3,253
Posted By katrvu
Prevent output to window
hello,
Any suggestion on how to prevent Standard output and Standard Error to window?
8,717
Posted By katrvu
Thanks, I think minifish mentioned shutting down...
Thanks, I think minifish mentioned shutting down server use perl.
do you know how we can do that? =)
8,717
Posted By katrvu
I have the same problem. Can anyone...
I have the same problem. Can anyone help????????????
11,274
Posted By katrvu
I believe that only replace 2nd instance in a...
I believe that only replace 2nd instance in a line, but what if I want to replace 2nd instance in a file?

thank you for the suggestion
11,274
Posted By katrvu
sed replace 2nd instance in a file
Hello,

I want to replace 2nd instance of "foo" in a file use sed.

Any suggestions?
13,644
Posted By katrvu
~THANK YOU VERY MUCH~:b:
~THANK YOU VERY MUCH~:b:
13,644
Posted By katrvu
This is what I tried, block_one="" ...
This is what I tried,

block_one=""
block_two="this is a sentence"
Test.sh $block_one $block_two
and it didn't work because $1=this and $2=is
13,644
Posted By katrvu
Bash script pass sentence in block
Hello,
I want to know is it possible to pass a block of sentence using bash.
For example,
I have a script called Test.sh that takes in $1 and $2.
and I'm calling Test.sh in a.sh

so

in a.sh...
5,520
Posted By katrvu
Thank you, any idea how can can add \\ for \ in...
Thank you, any idea how can can add \\ for \ in input. \ for / in input use sed?

shamrock wrote: sed -e "sQword_to_replaceQ${INPUT}Q" -e "s/\(\^\)word_to_replace\(\*\)/\1\2/"

and it return ...
5,520
Posted By katrvu
Solaris thanks
Solaris thanks
5,520
Posted By katrvu
Thank you, it works great except it's giving me...
Thank you, it works great except it's giving me "~@#$%^&*()-_=+{}[]|;:<>,./?" instead of "~@#$%^&*()-_=+{}[]\|;:<>,./?" so \ is missing
do you have idea wat a better command might be?

THANK YOU
5,520
Posted By katrvu
after use it, I got a error message say: syntax...
after use it, I got a error message say:
syntax error near unexpected token '-_=+{}[]\|'
I couldn't find what I did wrong.

String is "~@#$%^&*()-_=+{}[]\|;:<>,./?"
5,520
Posted By katrvu
However, I can not change what's in the string,...
However, I can not change what's in the string, because the string comes from a line in a file. and I cannot predict wat's in the file.
Other ideas?

thank you
5,520
Posted By katrvu
Urgent Help With Sed
Hello,
I need to use sed to replace a word in file.
My command is this:
sed "s/word_to_replace/'"${INPUT}"'/1 filename

and because INPUT="~@#$%^&*()-_=+{}[]\|;:<>,./?"
and / is also the...
Showing results 1 to 25 of 25

 
All times are GMT -4. The time now is 12:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy