?
Solved

grep -trying to get it work work

Posted on 2004-08-22
2
Medium Priority
?
305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Mysidia earned 1600 total points
ID: 11866819
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
ID: 11866869
ok, thanks. That worked. I feel dumb.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

800 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