Solved

grep -trying to get it work work

Posted on 2004-08-22
2
257 Views
Last Modified: 2010-04-20

I would like to run a grep command. I type the grep command and press enter, but nothing happens, I just get a cursor that blinks. When I press CTR+C I get my cursor back, but no output.

I typed at the command prompt:
grep 10.151.253

I imagine that I need to press a special key besides enter, but I don't know what.
0
Comment
Question by:brokeMyLegBiking
2 Comments
 
LVL 23

Accepted Solution

by:
Mysidia earned 400 total points
Comment Utility
You need to supply input to grep

either the output of another command or a filename

i.e.

grep 10.151.253  fileName

or

somecommand |grep 10.151.253

another possibility is

grep -rn 10.151.253 directory

grep -n 10.151.253 file1 file2 file3  directory/file4  /path/to/somedir/file5

or    grep -n 10.151.253 *

for that matter
0
 
LVL 4

Author Comment

by:brokeMyLegBiking
Comment Utility
ok, thanks. That worked. I feel dumb.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now