another beginner-type question.
i could've saved myself a lot of work over the weekend if i have checked the php randizer file but i didn't. so now, while this isn't entirely essential, is there a way of using /bin/ed or /usr/bin/ex within in a /bin/sh file to delete to-and-including PATTERN say, each of my 70 fils has FONT SIZE=3 B CENTER is there a way of deleting from the 1st line to CENTER? [[ and from /CENTER to EOF?? i could do this kwik and dirty, and type in/fix any anomalies later, but it would be nice to know. I've already tried 1, /CENTER d and a other such. zip. thanks, gary -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: another beginner-type question.
On Mon, Jul 21, 2008 at 12:51:28PM -0700, Gary Kline wrote: i could do this kwik and dirty, and type in/fix any anomalies later, but it would be nice to know. I've already tried 1, /CENTER d and a other such. zip. % sed -e 1,/CENTER/d junk.in junk.out -- David Kelly N4HHE, [EMAIL PROTECTED] Whom computers would destroy, they must first drive mad. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: another beginner-type question.
On Mon, Jul 21, 2008 at 03:09:46PM -0500, David Kelly wrote: On Mon, Jul 21, 2008 at 12:51:28PM -0700, Gary Kline wrote: i could do this kwik and dirty, and type in/fix any anomalies later, but it would be nice to know. I've already tried 1, /CENTER d and a other such. zip. % sed -e 1,/CENTER/d junk.in junk.out thanks, david. i was havinf cofffee when i thought sed! but was way off on the syntax. gary -- David Kelly N4HHE, [EMAIL PROTECTED] Whom computers would destroy, they must first drive mad. -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: another beginner-type question.
On Mon, Jul 21, 2008 at 01:32:57PM -0700, Gary Kline wrote: On Mon, Jul 21, 2008 at 03:09:46PM -0500, David Kelly wrote: On Mon, Jul 21, 2008 at 12:51:28PM -0700, Gary Kline wrote: I've already tried 1, /CENTER d and a other such. zip. % sed -e 1,/CENTER/d junk.in junk.out thanks, david. i was havinf cofffee when i thought sed! but was way off on the syntax. Not so far off, just one more / and you were there. -- David Kelly N4HHE, [EMAIL PROTECTED] Whom computers would destroy, they must first drive mad. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: another beginner-type question.
On Mon, Jul 21, 2008 at 03:09:46PM -0500, David Kelly wrote: On Mon, Jul 21, 2008 at 12:51:28PM -0700, Gary Kline wrote: i could do this kwik and dirty, and type in/fix any anomalies later, but it would be nice to know. I've already tried 1, /CENTER d and a other such. zip. % sed -e 1,/CENTER/d junk.in junk.out im taking this off-list so i dont show any further ignorance but i've tried everything SED i can think of without direct success [1], but want to know *how* to delete from /CENTER to EOF. sometimes sed spat out stderr messages, usually failed by printing the file to stdout. so when you have time, can you please show me? gary [1]. Indirectly, i used -e '/\/CENTER/d' (c) to get rid of thee last 3 lines. Beats vi'ing 70+ times! -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: another beginner-type question.
On Mon, Jul 21, 2008 at 04:13:53PM -0500, David Kelly wrote: On Mon, Jul 21, 2008 at 01:32:57PM -0700, Gary Kline wrote: On Mon, Jul 21, 2008 at 03:09:46PM -0500, David Kelly wrote: On Mon, Jul 21, 2008 at 12:51:28PM -0700, Gary Kline wrote: I've already tried 1, /CENTER d and a other such. zip. % sed -e 1,/CENTER/d junk.in junk.out thanks, david. i was havinf cofffee when i thought sed! but was way off on the syntax. Not so far off, just one more / and you were there. i'm more used to ed,ex, sh and some simple[r] tool. but the thing with gsed --- and REALLY the java;) got me going. i *did* try the man page that was when i really threw in the towel. gary -- David Kelly N4HHE, [EMAIL PROTECTED] Whom computers would destroy, they must first drive mad. -- Gary Kline [EMAIL PROTECTED] http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]