Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Nice hint, lets remove that extra stuff' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Nice hint, lets remove that extra stuff
Authored by: geohar on Apr 11, '02 05:45:13AM

I get numbered output from the server saying ok, miranda....

If I redefine the alias as

alias dict "curl -s 'dict://dict.org/d:\!*' | egrep -v '^220.*|^250.*|^150.*|^221.*'"

then I get the extraneous server messages removed.

Very cool tip though



[ Reply to This | # ]
Nice hint, lets remove that extra stuff
Authored by: vonleigh on Apr 11, '02 06:42:48AM

Hello,

I'm a unix newby, so pardon my ignorance if there is a much better way of doing this. I like the tip, but I didn't want the result to fill the screen and then have to go back and read what it was, so I decided to pipe it to more:

alias dict 'curl dict://dict.org/d:\!*|more'

This way it displays one page at a time. Just went back to the tip and this response above was added, great idea! More could be added to the above post also (just append a |more). Although I'd recommend not eliminating 150 from the result since it displays how many results were found. So:

alias dict "curl -s 'dict://dict.org/d:\!*' | egrep -v '^220.*|^250.*|^221.*' | more"

One question though, how do you make this stick between terminal sessions? I remember something about aliases.mine but that's it.

Vonleigh



[ Reply to This | # ]
aliases.mine
Authored by: robg on Apr 11, '02 09:21:27AM

There are a number of hints here about it; try searching on "aliases.mine" or just "alias" sometime. In a nutshell, though, add the "alias" command to a file named "alias.mine" located in ~/Library/init/tcsh (create those directories if you need to), save the file, close the terminal window and open a new one, and you should be good to go!

-rob.



[ Reply to This | # ]