grep commands

Asked by siriusE

Find all lines that start with a number (digit from 0-9).
Find all lines that end with "ing" and a period (.).
Find all lines that contain prog.

I sure would like help with these commands to hep me finish my lab, thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

cat file | grep '^[0-9]'
cat file | grep -i prog

with the ing one, do you want to search for 'ing.'?

Revision history for this message
siriusE (erniesanchezjr) said :
#2

lines ending with ing and "."

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Try:

cat file | egrep ''ing$'|'.''

maybe...

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

sorry:

cat file | egrep ''ing$'|'.$''

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Can you help with this problem?

Provide an answer of your own, or ask siriusE for more information if necessary.

To post a message you must log in.