Comments

Unix tricks - Useful but unusual

Here are a few Unix tricks you might not have seen before.

View full article »
Chatter

pipe nightmares

So many people type

cat file | grep Whatever

and I never really got it - why do all that extra typing when you could just say

grep Whatever file

???
| reply

and inefficient

If you do this in a shell script, you'll be repeatedly starting an extra process for no reason at all.
| reply

habit

Old habits die hard.
| reply

re: Pipe nightmare

Because, it's a consistency thing. In general you can do:

a | grep b

so:
ls -l | grep donkey
make all | grep error
...
whatever

cat /var/log/system/whatever | grep pattern

it's just using the same pattern as is used every other time, that's all.
| reply

There is a reason...

It was a standard practice in the past. Now, it is just as acceptable for small operations, but against larger files, it takes much longer due to the processing of the ENTIRE file once by cat, then reprocessing the STDIN from the pipe to grep.

If I am searching short phrases on the command line, I still cat | grep because it is easier to replace the end string than backing up past the filename. There is more than one way to do something in Unix/Linux, just understand the implications of each and use it wisely. Don't get wrapped around other peoples command line etiquite, sometimes there is a reason for their madness.
| reply

Unix Tricks

It just goes to show you that in Unix, there is more than one way to skin a "cat".
| reply

When you start dog

When you start dog training, you need know how to train a puppy can use dog behavior training and dog training tips.
| reply

Missing the "." (point)

The idea is not to "find" something in the file, rather to omit what you don't want. In this example the idea is to see everything that is 'not' a blank line.
| reply

This is good stuff...

I have used the "grep ." command before and coincidentally, it was to eliminate some extraneous blank lines from a file that was creating issues with a poorly written file parser; the parser was choking on non-printable characters. I was using vi to check for those non-printables, but using cat is much simpler. Thanks...
| reply

ugg boots

UGG Boots is one of the most popular boots in the fashion realm, and it also the must-have item in the cold winter to keep your foot warm, have a pair of sheepskin UGG Boots as the gift also the great point, so, why you still hesitate, follow me!
| reply

replica bags

Your comments on this question are pertinent replica bags .And people always do things like and they don't know what they replica handbags are doing at the same time .It is a really common fault .
| reply

Oh! What a cool points and

Oh! What a cool points and the cold weather, the winter is coming, I’d like to share the UGG Boots tips to keep your feet warm.. there’s few series UGGS for you to see the winter out, such as classic tall ugg boots, classic short ugg boots, claasic cardy ugg boots and so on, the cute boots not only show you the warm, but also the fashion style. Well, seems too much words, see you next time~
| reply

ugg boots

Good day! Thx for your great post and Im thinking about how to introduce my ugg boots to you cos Im not sure if u like this. Many people who live in the cold area like the ugg boots, especially the north-europe. Our uggshare.co.uk supply the cheapest classic cardy ugg boots, class tall ugg boots, classic short ugg boots and other series of uggs, hope my words didn’t trouble u, cy!
| reply

ugg boots

Hey, WHATare u interested in fashion ugg boots? The winter is coming soon, I think you need a pair of classic cardy ugg boots to keep your feet warm, or what do you think about classic tall ugg boots and classic short ugg boots? I like these three series ugg boots so much, how about you?
| reply
Post a reply
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
peer-to-peer

jfruh
Apple syncing patent can't come soon enough

pasmith
New Twitter features borrow from 3rd party clients

Esther Schindler
Open Source Changes the Software Acquisition Process

mikelgan
How to set up continuous podcast play on the new iTunes

David Strom
Five important Windows 7 mobility features

sjvn
Guard your Wi-Fi for your own sake                        

Sandra Henry-Stocker
Grepping on Whole Words

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace