Sponsored Content
Homework and Emergencies Homework & Coursework Questions Grep commands: need some practice help please Post 302998608 by Neo on Monday 5th of June 2017 01:18:40 AM
Old 06-05-2017
Examples to think about. Try these command line experiments on your computer and see what happens:

echo Raining | grep ^R

What did you get after this experiment?

echo Raining | grep ^a

What did you get after this experiment?

echo Raining | grep ing$

What did you get after this experiment?

echo Raining | grep in$

What did you get after this experiment?

Read the manual page on grep by trying this on your computer:

man grep

What did you see after you did the experiment above?

Did you see any information that might help you with your homework tasks?

Did you see any examples at the end of the manual entry that might help you?
This User Gave Thanks to Neo For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simple grep question, but I'm out of practice

Never mind, I did more research, and now am using grep -v './temp/', dumping it into a new text file, then using mv -f to make that the original file. Thanks for reading! --------------- Hi folks, I haven't done any scripting in years, and now I have a problem. Our backup tapes are filling... (0 Replies)
Discussion started by: citygov
0 Replies

2. UNIX for Dummies Questions & Answers

find and grep commands

I'm having trouble with the following commands i. count the number of lines which end in a 4 letter word grep '{4\}$' bfile <<seems to print out everything abc abc abcd joe joe john bob bill gregory greg greg gregory the grep command prints out the lines with 4 letter words and the... (3 Replies)
Discussion started by: StrengthThaDon
3 Replies

3. Shell Programming and Scripting

Grep commands in loop

Hi All, Reference to my previous post I need to compare all the lines in the file1 with file2 for this condition if file1 {$3,$5} ==file2 {$3,$5} then grep file2{$1}latest date. need output in file3 10/04/2008 09/04/2008 09/04/2008 08/04/2008 can anyone suggest me Thanks... (0 Replies)
Discussion started by: karthikn7974
0 Replies

4. UNIX for Dummies Questions & Answers

How to run UNIX commands for practice in Windows 2000 OS?

How to run UNIX commands for practice in Windows 2000 OS? If you suggest to install Cygwin, please let me know the procedure to install, or else I feel happy if you suggest any stand alone app for running UNIX commands..:) (2 Replies)
Discussion started by: Srikanthk
2 Replies

5. UNIX for Dummies Questions & Answers

grep commands

I need your's help to display user with greep command form /etc/passwd 1. to display all login to begin and finishing with letter a or b etc.users admina bserb broota 2. beginning and finishing with the same sign etc. users aghata:.... roootr:....3. to contain what the least three... (1 Reply)
Discussion started by: ViruS89
1 Replies

6. Shell Programming and Scripting

Difference between 2 grep - commands

Hi, I need to know the difference between this commands: grep * *search* grep "*" *search* As far as i know does the 2nd command search for files which have a name with *search* and greps then all which have chars from a-z in the file content. But was does the first command?? Best... (1 Reply)
Discussion started by: xus
1 Replies

7. Shell Programming and Scripting

echo and grep commands

Hey im new in this...anything will be helpful... The user will input the word or phrase .... I want to search the user input in file (by lines) but not all then with this line search on another file ( with the specific line) and show to the user. Example: file1.txt ======= a aa aaa... (2 Replies)
Discussion started by: Sundown
2 Replies

8. UNIX Desktop Questions & Answers

How to practice unix commands on windows 7 machine

Hello, I am pretty new to UNIX and would like to know how i can run unix commands on a windows 7 machine. Basically, I want to practice running commands, created bash/awk/etc. scripts. I've read some things about cygwin, but it doesn't sound like it's exactly what I'm looking for. Any... (4 Replies)
Discussion started by: tester213
4 Replies

9. Shell Programming and Scripting

Grep Commands

I have a text file that has multiple lines in it with multiple dates and years. I was trying to figure out the best way to remove the line that had 2010 and 2011 to an archive file. We only need to keep the 2012 and 2013 lines in the original file. The following is a sample line in the txt file:... (2 Replies)
Discussion started by: smkremer
2 Replies

10. Shell Programming and Scripting

Help with ls, grep commands

Oracle Linux 6.4/Bash shell I have six files as shown below. Using ls/grep (or anything) , I need to list all files which start with the pattern stomper but not the ones which ends with 1. $ touch stompera $ touch stomperb $ touch stomperc $ touch stompera1 $ touch stomperb1 $ touch... (7 Replies)
Discussion started by: kraljic
7 Replies
DEBCONF-MERGETEMPLATE(1)					      Debconf						  DEBCONF-MERGETEMPLATE(1)

NAME
debconf-mergetemplate - merge together multiple debconf template files SYNOPSIS
debconf-mergetemplate [options] [templates.ll ...] templates DESCRIPTION
Note: This utility is deprecated. You should switch to using po-debconf's po2debconf program. This program is useful if you have multiple debconf templates files which you want to merge together into one big file. All the specified files will be read in, merged, and output to standard output. This can be especially useful if you are dealing with translated template files. In this case, you might have your main template file, plus several other files provided by the translators. These files will have translated fields in them, and maybe the translators left in the english versions of the fields they translated, for their reference. So, you want to merge together all the translated templates files with your main templates file. Any fields that are unique to the translated files need to be added in to the correct templates, but any fields they have in common should be superseded by the fields in the main file (which might be more up-to-date). This program handles that case properly, just list each of the translated templates files, and then your main templates file last. OPTIONS
--outdated Merge in even outdated translations. The default is to drop them with a warning message. --drop-old-templates If a translation has an entire template that is not in the master file (and thus is probably an old template), drop that entire template. SEE ALSO
debconf-getlang(1) AUTHOR
Joey Hess <joeyh@debian.org> 2012-09-10 DEBCONF-MERGETEMPLATE(1)
All times are GMT -4. The time now is 02:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy