Sponsored Content
Top Forums UNIX for Dummies Questions & Answers grep where expressions reside in file Post 65764 by GMMike on Tuesday 8th of March 2005 10:20:01 PM
Old 03-08-2005
I found that when I use -f alone grep displays all the input file and that -wf works well.

Thanks for your help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

More Grep - Regular Expressions

Hey all! I'm trying to search a file and return all instances of a word, let's say 'foo' in this case, as long as it's not a function name. For example: 1) int foo; //OK 2) //'this is totally fooed up' is also OK 3) int foo (int x, int y) //not ok to return I've tried a lot of regular... (7 Replies)
Discussion started by: Jombee
7 Replies

2. UNIX for Dummies Questions & Answers

grep and regular expressions :

I wrote a simple korn shell where I am trying to filter all the good record layouts of a file to only leave the bad ones to look at. That file is hudge. Aside from '# comments' and 'var=ssss', all record should follow a specific record layout, with comma seperated fields. Some fields can have any... (2 Replies)
Discussion started by: Browser_ice
2 Replies

3. Shell Programming and Scripting

Assistence With Using Asterisks in GREP Expressions

I am attempting to find all complete words which contain an asterisk at the beginning and the end - for instance, "*Hello?*" or "*you*". From what I've read, I would have thought that the following expression would do that just fine: \<\*.*\*\> \< denoting the beginning of a word. \*... (12 Replies)
Discussion started by: MagusScythe
12 Replies

4. Shell Programming and Scripting

searching regular expressions with special characters like dot using grep

hi everybody I am a new user to this forum and its previous posts have been very useful. I'm searching in a file using grep for patterns like 12.13.444 55.44.443 i.e. of form <digit><digit>.<digit><digit>.<digit><digit><digit> Can anybody help me with this. Thanks in advance (4 Replies)
Discussion started by: jpriyank
4 Replies

5. Shell Programming and Scripting

How to grep using a line break in regular expressions?

Hi, I have a file as below, {#### if file then file else file } print file i need to fine the count of all the pattern - file, inside the { } i'm using a grep command as grep -c \{'*file*'\} fake.sh\ It doesn't gives me any result, i think the problem here is the... (5 Replies)
Discussion started by: divak
5 Replies

6. UNIX for Advanced & Expert Users

where do the configuration files from Redhat (fedora) authconfig-tui reside?

I have tried moving out the /etc/ldap.conf as well as /etc/openldap/ldap.conf files. I have LDAP Authentication turned on in the TUI. It lets me define a host and base, but the entries are not saved to the above files. /etc/sysconfig/authconfig has a bunch of environmental variables, but none... (2 Replies)
Discussion started by: druidmatrix
2 Replies

7. Homework & Coursework Questions

Grep expressions homework, need assistance

Please dont delete, im listing my assignment and will be editing as i work on it. I am NOT looking for answers but help in understanding how to use grep 1. The problem statement, all variables and given/known data: For each question, list the command lines used in addition to any other details... (3 Replies)
Discussion started by: alindner
3 Replies

8. UNIX for Dummies Questions & Answers

extract columns using grep or regular expressions

I am trying to print columns from a table whose name (header) matches a certain string. E.g., patient1001 patient1002 patient2005 patient3005 patient4001 0 0 0 0 0 2 9 2 8 3 2 7 3 0 2 Say I want to print columns whose names end with "01" patient1001 patient4001 0 0 2 3 2 2 ... (3 Replies)
Discussion started by: quextil
3 Replies

9. Homework & Coursework Questions

Regular Expressions with GREP

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Given a text file (big_english.txt) containing roughly 250,000 words, answer the following using grep and... (2 Replies)
Discussion started by: blahblahblah123
2 Replies

10. UNIX for Dummies Questions & Answers

grep and regular expressions

Hi All, For the past many days I have solved a lot of grep and regular expression questions, Now I am in a search for a good quality set of questions that can help me build and check my knowledge of grep with regular expressions, it would be great if anyone could help me with my requirement. ... (1 Reply)
Discussion started by: rahulkalra9
1 Replies
MSGS(1) 						      General Commands Manual							   MSGS(1)

NAME
msgs - system messages and junk mail program SYNOPSIS
msgs [ -fhlpq ] [ number ] [ -number ] msgs -s msgs -c [ -days ] DESCRIPTION
Msgs is used to read system messages. These messages are sent by mailing to the login `msgs' and should be short pieces of information which are suitable to be read once by most users of the system. Msgs is normally invoked each time you login, by placing it in the file .login (.profile if you use /bin/sh). It will then prompt you with the source and subject of each new message. If there is no subject line, the first few non-blank lines of the message will be displayed. If there is more to the message, you will be told how long it is and asked whether you wish to see the rest of the message. The possible responses are: y type the rest of the message. RETURN synonym for y. n skip this message and go on to the next message. - redisplay the last message. q drops you out of msgs; the next time you run the program it will pick up where you left off. s append the current message to the file ``Messages'' in the current directory; `s-' will save the previously displayed message. A `s' or `s-' may be followed by a space and a file name to receive the message replacing the default ``Messages''. m or `m-' causes a copy of the specified message to be placed in a temporary mailbox and mail(1) to be invoked on that mailbox. Both `m' and `s' accept a numeric argument in place of the `-'. Msgs keeps track of the next message you will see by a number in the file .msgsrc in your home directory. In the directory /usr/msgs it keeps a set of files whose names are the (sequential) numbers of the messages they represent. The file /usr/msgs/bounds shows the low and high number of the messages in the directory so that msgs can quickly determine if there are no messages for you. If the contents of bounds is incorrect it can be fixed by removing it; msgs will make a new bounds file the next time it is run. The -s option is used for setting up the posting of messages. The line msgs: "| /usr/ucb/msgs -s" should be include in /etc/aliases to enable posting of messages. The -c option is used for performing cleanup on /usr/msgs. An entry with the -c option should be placed in /etc/crontab to run every night. This will remove all messages over 21 days old. A different expiration may be specified on the command line to override the default. Options when reading messages include: -f which causes it not to say ``No new messages.''. This is useful in your .login file since this is often the case here. -q Queries whether there are messages, printing ``There are new messages.'' if there are. The command ``msgs -q'' is often used in login scripts. -h causes msgs to print the first part of messages only. -l option causes only locally originated messages to be reported. num A message number can be given on the command line, causing msgs to start at the specified message rather than at the next message indicated by your .msgsrc file. Thus msgs -h 1 prints the first part of all messages. -number will cause msgs to start number messages back from the one indicated by your .msgsrc file, useful for reviews of recent messages. -p causes long messages to be piped through more(1). Within msgs you can also go to any specific message by typing its number when msgs requests input as to what to do. FILES
/usr/msgs/* database ~/.msgsrc number of next message to be presented AUTHORS
William Joy David Wasley SEE ALSO
aliases(5), crontab(5), mail(1), more(1) BUGS
4th Berkeley Distribution October 22, 1996 MSGS(1)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy