Solved

grep -trying to get it work work

Posted on 2004-08-22
2
285 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
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

856 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