Sponsored Content
Top Forums UNIX for Dummies Questions & Answers General find /grep question: files with lines ending in r Post 302844649 by Corona688 on Monday 19th of August 2013 02:44:05 PM
Old 08-19-2013
I see.

Code:
awk '{ A[FILENAME] } /r$/ { A[FILENAME++} END { for(X in A) if(!A[X]) print X }' *

This will not work on empty files.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

General Question

Hi, I've been racking my brains trying to remember, but, whats the command to change the default shell? I'm currently always in the Korn shell and I want to start out in the Bash shell. I'm running a variant of BSD I guess in Mac OS X 10.2.2 and Mandrake. Thanks. ccindyderek:confused: (4 Replies)
Discussion started by: ccindyderek
4 Replies

2. UNIX for Dummies Questions & Answers

grep something to find which files, lines contain something

in aix, i use grep something * to get the files, lines that contain something. but i couldnt get the same result from a sun box. what is the equivalent? thanks (4 Replies)
Discussion started by: yls177
4 Replies

3. Shell Programming and Scripting

general question?

Perl, Python, and PHP are these languages easy to use? Are they command line or are they part of a GUI? (2 Replies)
Discussion started by: wmosley2
2 Replies

4. Shell Programming and Scripting

Quick question on grep: grabbing lines above and below

Just a quick question on grep/egrep. I am writing a shell script that is looking for certain strings in a text file. It works well and gets exactly what I need. However, the way the program writes to the text file, it puts the timestamp in a line above the string I am looking for and the path... (3 Replies)
Discussion started by: thecoffeeguy
3 Replies

5. Shell Programming and Scripting

General question about the relationship between KSH and sed/grep/awk etc

Greetings all, Unix rookie here, just diving into ksh scripting for the first time. My question may seem confusing but please bear with me: If I'm understanding everything I'm reading properly, it seems like the ksh language itself doesn't have a lot of string manipulation functions of... (2 Replies)
Discussion started by: DalTXColtsFan
2 Replies

6. Shell Programming and Scripting

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

Hi, I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file: Name = "abc" The regex I'm using to match the same is: egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies

7. Shell Programming and Scripting

Perl XML, find matching condition and grep lines and put the lines somewhere else

Hi, my xml files looks something like this <Instance Name="New York"> <Description></Description> <Instance Name="A"> <Description></Description> <PropertyValue Key="false" Name="Building A" /> </Instance> <Instance Name="B"> ... (4 Replies)
Discussion started by: tententen
4 Replies

8. Shell Programming and Scripting

Find out if multiple files have lines ending with"r"

I am trying to find out which files in a group of files have lines ending in r. What I have is this: cat /tmp/*RECORDS| if grep r$>/dev/null; then echo "yes";else echo"no";fi Records is more than one file. There are the following files TEST-RECORDS /volume/testing /volume/programs ... (2 Replies)
Discussion started by: newbie2010
2 Replies

9. Shell Programming and Scripting

How to find files containing two specific lines and delate those lines?

Hi I need to find files in a specified folder where are two specified lines of text and delate that lines. It looks like this" 35. ?>NL 36. <iframe>.......</iframe>NLThe problem is that "?>" is in the other lines and id should not be removed if the next line is not like "<iframe>....." So... (4 Replies)
Discussion started by: androwida
4 Replies

10. Shell Programming and Scripting

Find pattern; grep n lines before and after

Hi, I need help to grep a specific part of a log file (bold). 24/2/2017-16:57:17.056 frosti-1 M3UA-Tx: } 24/2/2017-16:57:17.056 frosti-1 M3UA-Tx: extensionContainer <Not Present> 24/2/2017-16:57:17.056... (8 Replies)
Discussion started by: vasil
8 Replies
lookbib(1)							   User Commands							lookbib(1)

NAME
lookbib - find references in a bibliographic database SYNOPSIS
lookbib database DESCRIPTION
A bibliographic reference is a set of lines, constituting fields of bibliographic information. Each field starts on a line beginning with a `%', followed by a key-letter, then a blank, and finally the contents of the field, which may continue until the next line starting with `%'. The lookbib utility uses an inverted index made by indxbib to find sets of bibliographic references. It reads keywords typed after the `>' prompt on the terminal, and retrieves records containing all these keywords. If nothing matches, nothing is returned except another `>' prompt. It is possible to search multiple databases, as long as they have a common index made by indxbib(1). In that case, only the first argument given to indxbib is specified to lookbib. If lookbib does not find the index files (the .i[abc] files), it looks for a reference file with the same name as the argument, without the suffixes. It creates a file with a .ig suffix, suitable for use with fgrep (see grep(1)). lookbib then uses this fgrep file to find refer- ences. This method is simpler to use, but the .ig file is slower to use than the .i[abc] files, and does not allow the use of multiple reference files. FILES
x.ia x.ib x.ic index files x.ig reference file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWdoc | +-----------------------------+-----------------------------+ SEE ALSO
addbib(1), grep(1), indxbib(1), refer(1), roffbib(1), sortbib(1), attributes(5) BUGS
Probably all dates should be indexed, since many disciplines refer to literature written in the 1800s or earlier. SunOS 5.10 14 Sep 1992 lookbib(1)
All times are GMT -4. The time now is 09:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy