The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   does "sed" work differently on Darwin/tcsh? (http://hintsforums.macworld.com/showthread.php?t=7283)

steve_rothman 11-22-2002 10:40 AM

Thanks everyone!!!!
 
I just want to say thanks to everyone!

Getting the Gnu version of sed did indeed solve my problem - it amazes me because the source for my one-liner is from 5 years ago, so it sounds to me like the version of sed included with Jaguar must be *really* old. Oh well.

More than dealing with sed, though, I have learned a lot from all the comments on this thread. Thanks a ton, everyone. -Steve

osxpez 11-22-2002 04:00 PM

steve: It doesn't have to be *very* old. It's just not GNU sed. Again, I'm surprised that Apple chooses not to go more fully GNU. And the choice of tcsh over bash or zsh is strange as well. It's like Apple has somehow grasped that Unix is powerful, but missed that GNU is the organisation that takes it to a fuller potential.

osxpez 11-22-2002 04:04 PM

Thanks for the info thatch and sao! I'll try just that when my "fink install 'gtk+'" finishes ... which could take quite some while it seems.

$ fink -V
Package manager version: 0.11.0
Distribution version: 0.4.9.cvs

osxpez 11-23-2002 02:40 AM

I did both "fink selfupdate-cvs" and "fink update-all" but I still can't eterm:

$ fink list '*eterm*'
Information about 769 packages read in 1 seconds.

I noticed on sao's output from fink that you had about 1,000 more packages... What am I doing wrong?

thatch 11-23-2002 03:39 AM

osxpez, did you use sudo for your self-update command? If so, something is not right because this is what I get:

Code:

fink list '*eterm*'
Information about 1774 packages read in 1 seconds.

    eterm            0.9-1        Color VT102 terminal emulator

You may have mentioned it earlier in this very long thread or elsewhere on the forum; but how did you install or upgrade your fink for Jaguar?

sao 11-23-2002 04:39 AM

osxpez,

You probably forgot to edit your fink.conf file:
Code:

Trees: local/main stable/main stable/crypto local/bootstrap unstable/main unstable/crypto
this step is highly recommended as most packages for 10.2 are in unstable. And after, run 'fink selfupdate-cvs' again.

Did you installed Fink from scratch from here?:

http://fink.sourceforge.net/news/jag-bootstrap.php

Maybe you show us the result of 'sudo fink list'


Cheers...

osxpez 11-23-2002 05:37 AM

sao: Thanks for beeing there! Yes, I installed Fink from scratch again using that URL. And I'm bloody sure I entered that "unstable" record into my fink.conf since the installation instructions told me to do so. But now when you suggested it again I had a check and it wasn't there. No wonder we have different "fink list" output. I'm running a "fink selfupdate-cvs" as of now and it surely seems to be working harder this time. :)

One more thing. You ask me if I used sudo for the fink update things. No, since fink seems to be using sudo itself (asking me for the password and all) I didn't think that was necessary.

sao 11-23-2002 09:15 AM

osxpez,

Great, after your 'fink selfupdate-cvs' finishes, your list of available packages to install from source will increase by a lot.

You are right about using 'fink selfupdate-cvs', fink will automatically do it for you, asking you for a password, even when you didn't write 'sudo'.


Cheers...

Titanium Man 11-24-2002 09:50 PM

Way off subject
 
Just to make everyone mad (or provide an alternate solution to using sed, perl, {g,m,a}wk):

% links -dump http://checkip.dyndns.org
Current IP Address: 12.34.56.789
Hostname: some.place.com

mervTormel 11-24-2002 10:18 PM

:mad: grrrrrrrrr!eat tip, TiMan!

osxpez 11-25-2002 03:21 AM

Yes, that could be the right tool for the job. But maybe a bit bloaty if you just want to strip the html tags from a file on local disk. You all probably know that life is entirely about saving CPU cycles? :)

sao 11-25-2002 03:38 AM

The beauty of the forums...I learn something new every day!

Now, we can all choose whatever way we need it.

Good tip, TiMan...!


Cheers...

Titanium Man 11-25-2002 10:39 AM

Well for local files, I do:

cat foo.html | links -dump | less

but with all that piping and evoking of cat, links, and less, it might be a bit too bloaty for everyone to use ;)

osxpez 11-25-2002 12:16 PM

UUOC watch dog - That should probably be:

links -dump < foo.html | less

mervTormel 11-25-2002 12:20 PM

i'm pretty sure this is a case of ĜUUOC...

$ links -dump < poop.html | less
URL expected after -dump

pez, don't make me come over there.

osxpez 11-25-2002 12:28 PM

Well, I don't have links installed, but that _must_ go for the "cat" version as well or links is a truly wierd program. What about:

$ links -dump bar.html | less

Depends some of what links regards as an URL.

Titanium Man 11-25-2002 09:37 PM

It's not the processor cycles, but the typing that gets to me.

links -dump bar.html | less

not only works bit there is less typing than with my original siggestion. Thanks!

thatch 11-25-2002 11:26 PM

Great thread!
 
This one might deserve a rating it's so good, and even if you don't use links. Very educational.

BTW, I didn't realize that I didn't need sudo when doing a fink install. It's always been a habit while installing with fink for me.

kudos to that movie from Paul for it's demonstration of 'size really does matter'; at least in that instance the chainsaw won hands down, literally.

mervTormel 11-26-2002 02:24 AM

Re: Great thread!
 
Quote:

Originally posted by thatch
...kudos to that movie from Paul for it's demonstration of 'size really does matter'; at least in that instance the chainsaw won hands down, literally.
dialog matters, too...

http://home.mindspring.com/~bduart/tobor.mov [ thanks, henry ]

thatch 11-26-2002 03:00 AM

Quote:

Originally posted by mervTormel
dialog matters, too...
Yes, definitely. An important point of this thread.

I like the movie. Strange though, I can't seem to save it with the 'save as' in IE. It complains that it can't save because the disk may be too full. My drive is only 41% full. There are currently no other movies in my ~/Movies.

With Paul's movie earlier today, I saved it and it played in a finder window from column view. But when I tried to play it again later on, it complained it couldn't find some certain file with a strange name consisting of numbers and letters, I think.


All times are GMT -5. The time now is 05:36 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.