Sponsored Content
Homework and Emergencies Homework & Coursework Questions Student needs grep command help Post 303007968 by RudiC on Friday 24th of November 2017 05:21:37 AM
Old 11-24-2017
Quote:
Originally Posted by jetoutant
. . .
Code:
grep ECE 3\.[5-9] smallFile
grep 'ECE 3\.[5-9]' smallFile
grep ECE {3}\.[5-9] smallFile 
grep ECE '{3}\.[5-9]' smallFile

don't work to eliminate a 2or 4 before the dot
There's a fundamental difference between form 1, 3 and 4 and form 2 of your commands. Can you tell it?
Why shouldn't one form (which one?) work given you match the field separators in data file and regex?
 

6 More Discussions You Might Find Interesting

1. Programming

novice student needs help

Help! I am very stuck!!! I have to produce a practical implementation of ONC RPC for an assignment and I do not know where to start. I hve done much searching on sun's site but everything is too complicated for someone with my limited knowledge. I only know the very basic unix commands and have... (1 Reply)
Discussion started by: karen79
1 Replies

2. Linux

Student needs help...

I know taking the easy way out isn't going to help me learn anything, but hopefully it will at least give me some guidence... I have a project and here's what I have to do... A company is currently running a Digital VAX and I have to replace it with a Linux server. There are 19 terminals... (4 Replies)
Discussion started by: MGold4357
4 Replies

3. Shell Programming and Scripting

Newbie Student Need Help!

Is there anyone here that can help me with my unix assignment? I've been working on it for 3 days now. It is regarding writing a script. I've got a few questions that I need some answers. Please someone who are willing to help add me to their msn messenger: **************** In one part of... (0 Replies)
Discussion started by: DaSFLiP
0 Replies

4. UNIX for Dummies Questions & Answers

student need help!

yes im a student at Sandersville Technical College in Sandersville, Georgia. Im doing a presentation on UNIX can someone help me discribe what UNIX is and how to use it and the different features it has? (6 Replies)
Discussion started by: willnadaze
6 Replies

5. UNIX for Dummies Questions & Answers

Hello Everyone - Student in Need of Help

Hi everyone. Let me just start off by saying I'm a college student and I love playing around with UNIX. I registered here because I have a UNIX shell scripting class and I am having some issues with my homework. I'm not looking for answers to the problems, just some help to get me on my way.... (1 Reply)
Discussion started by: Hexum311
1 Replies

6. UNIX for Beginners Questions & Answers

Student needs grep command assistance

I am a student in a UNIX/Linux classes having hard time with grep looking for assistance on some home work I need to figure out some kind of grep command to get a out put that only gives me information from a sample file and only list the people with the first name John the sample file is named... (1 Reply)
Discussion started by: jetoutant
1 Replies
ZGREP(1)                                                      General Commands Manual                                                     ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 08:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy