@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> hi all
<0> EXOTICS ADULT FORUM ::::::::::: http://exotics.ezbbforum.com .......
<1> i have some special characters in the lines I'm trying to sed, and the . (dot character) does not match all of them, is there a way I can match them all?
<2> ados: post an example line of text you want to use sed on
<1> ! R Curiosty Kills The Cat ! Between The Earth And Sky<a><br> [x1] (Aa2RbwjPpr4).avi
<1> Balloons [x1] (oFDAt7cLIlw).avi
<1> that would be a normal line
<3> what do you want to do with that line?
<1> my regex is this
<1> ls | sed 's/.*\(...........\)).*/\1/'
<1> extract the identifier between the brackets
<2> ok
<2> ados: echo "^?Sky<a><br> [x1] (Aa2RbwjPpr4).avi" |sed -ne 's/.*(\(.*\)).*/\1/p' #Aa2RbwjPpr4
<1> does that handle the special chars? did you see the special chars?
<1> does the /p switch do something?



<1> that code goes wrong the same way as mine
<1> right now, i just use a python script that filters all chars above ord(127), since i only need the identifer anyway ... but
<2> yea, works for me
<2> ados: i use the tool thats easiest to use and needs the least amount of script
<1> i guess i'll just have to fix my filename unicode...
<2> ados: sed has a good quality regex engine
<1> ok :)
<2> ados http://www.student.northpark.edu/pemente/sed/sed1line.txt AND sed.sf.net
<2> ados: python is cool but you cant write one liners in python that i've discovered
<1> it's true
<2> yea, one liners are quick and kludgy but they work and that's my style ;)
<4> woot
<4> sed!
<5> sed!
<4> any hints on how i could replace core/updates/4/i386/xorg-x11-tools-6.8.2-37.FC4.49.2.1.i386.rpm with cre/updates/4/i386/rpm
<4> so far i've ended up replacing nearly everything or just apending rpm
<4> :)
<4> i know pcre. how close is sed to pcre?
<4> how do i make .* not be gready?
<1> sed 's:/[^/]*\.:/:
<1> sed 's:/[^/]*\.:/:'
<4> hrm
<1> o.O
<1> doesn't that work?
<4> the thing you gave me?
<4> no idea
<4> the perl did
<1> lololol
<4> like i said i know perl regular expresions
<4> perl -ple 's///' :)
<1> i never work with greedy - nongreedy, too much possibility for some external thing to come in and mess up my day
<4> well * by default in pcre grabs as much as it can
<1> i know what greedy nongreedy means
<4> so /.*$ would get everything from core/ to the end of the file
<4> ah
<1> ****ing google it, you piss me off
<4> well its hard to avoid *
<4> man
<4> i am currently reading 2 sed documents that have failed to help me and so i asked
<4> sesh
<2> BB|AtWork: echo "core/updates/4/i386/xorg-x11-tools-6.8.2-37.FC4.49.2.1.i386.rpm" |sed -ne 's/\(core\/updates\/4\/i386\/\).*\.\(.*\)/\1\2/p' #core/updates/4/i386/rpm
<4> ah so replace the whole line with what i want
<4> thanks gnubien
<2> BB|AtWork: yea, if that is what you need
<4> close enough its just for testing my lits of rsync filters. just dont want to read throught the m***ive file list to find the 10 files that are included mistakenly
<2> BB|AtWork: look like that might do what you want then
<4> good enough. tweeking it now :0
<4> :)
<4> much thanks
<2> BB|AtWork: have fun ;)
<4> got the rsync sorted. probably a bad idea to run this and split as it could eat up all the web site's file space :)
<4> guess i'll try it monday
<4> laters
<6> echo " fcsh: ***igned 1 as the compile target id" | sed how do I get the number after the word "***igned" ?
<7> glen_quagmire: echo " fcsh: ***igned 1 as the compile target id" | sed 's/.****igned \([^ ]*\).*/\1/'
<6> goldfish: thanks
<8> hi guys , i tried to come up with a sed scipt and i get an error can someone help please
<8> http://pastebin.com/874193
<8> i get sed: -e expression #1, char 16: unterminated `s' command
<9> slash (/) missing at the end => sed -e 's/\.html/\.shtml/'



<8> hmm
<8> let me see
<8> k
<8> now i get sed: -e expression #1, char 27: unterminated `s' command and 25
<9> same, missing # => "s#/dir/xxx#/dir/$file#"
<8> thanks man , u da man
<8> saved me a lot of headake
<9> ;-)
<8> do u ahve a min to explain me shtm in this script ?
<8> *smth
<9> Sorry, because my english is too bad... but i can try...
<8> just wanted to know what if this is the line sed -e 's/\.html/\.shtml/' that makes sed not pharse the whole html_file and replace the reccord one by one
<8> i think i figured it out, just another thing ... i want to reaplce some html conde , how do i have to imput the this code in the sed expresion ?
<8> sed -i -e "s#/<td width="655" height="100%" valign="top">&nbsp;</td>#/..
<8> ./sed: line 3: syntax error near unexpected token `<'
<8> zipe any hints ?
<9> Sorry i was buzy, but i can't answer to you because i don't understand all you say, 'cause my bas english, sorry
<8> ok
<8> i want to replace this
<8> <td width="655" height="100%" valign="top">&nbsp;</td>
<9> s/bas/bad/
<8> and i get a error ./sed: line 3: syntax error near unexpected token `<'
<8> do i had to put it between " "
<9> I think rather between ' '
<9> sed 's#<td width="655" height="100%" valign="top">&nbsp;</td>#...#'
<8> worked
<8> thanks
<9> ;-)
<8> one last error and i won't bother you anymore ... i have to replace that with "<!--'#'include virtual="
<8> if i take out # works if i leave it the script does not work
<8> how can i fix this ?
<8> this is the actual line
<8> s#<td width="655" height="100%" valign="top">&nbsp;</td>#/<td width="655" height="100%" valign="top"><!--'#'include virtual='"$file"' --></td>#'
<8> sry this one
<8> sed -i -e 's#<td width="655" height="100%" valign="top">&nbsp;</td>#/<td width="655" height="100%" valign="top"><!--#include virtual='"$file"' --></td>#' $sfile
<8> without ' '
<8> is there anyway i can "tell" the script that # is part of the text to replace and not sed option
<8> ?
<8> zipe any suggestions ?
<9> replace "#" by "|" (or any other caracters like or ...)
<8> hmm the idea is that i need # in the html code for include
<8> if i take it out the include does not work
<9> no, you don't understand me, i said replace the "#" bye "|" like delimeters... example :
<9> sed 's|<td width="655" height="100%" valign="top">&nbsp;</td>|...|'
<8> oh
<8> sry
<8> i tought replace that particular #
<8> i llg ive it a try
<8> finaly ... thanks a whole lot
<8> u sed master
<8> :)
<9> Oh no, just a novice and sorry for my bad english.
<8> thanks again
<10> All I need to know is what to make this B=`echo $I | sed -e 's/ - /.\*/g'| sed -e 's/ /\\ /g'` output escaped spaces
<10> any ideas?
<11> use $(), again
<12> hi, how can i prepend a file to the stream?
<12> so i could use sed -i to add copyright notices
<11> why so complicate?
<11> mv file file.old; cat /blah/copyright.txt file.old >file; rm -f file.old
<11> something like that
<12> well
<12> am i here in #cat or in #sed? :)
<11> most of us reomment better ways if sed would be just too complex
<11> but in that case
<11> sed's "r" command might help
<12> TheBonsai: yes, but how? :)
<11> mh
<11> try
<11> sed '1rfilename'
<12> TheBonsai: doesnt work
<11> well, it seems it puts it after line 1
<11> anyways
<11> stick with cat


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sed
or
Go to some related logs:

ktorrent always stalled
linux ralink rt2500 wpk
gentoo jokes
fedora automount execute fstab memory stick
#perl
AUTOLOAD : lvalue
ubuntu dapper switch from gnome to kde
fraps for linux
dutck english
+plan9 +vmware +garbled



Home  |  disclaimer  |  contact  |  submit quotes