Hello all. I have a flat text file, separated into paragraphs. I need to grep for all paragraphs containing a specific term (Flash, in this case), and first line in each paragraph containing that term, along with the line immediately preceding the first occurence.
Example paragraph:
I need to get:
Is there a set of flags for 'grep -p', or other commands that I can use? The file has almost ten thousand paragraphs, and only 3,000 contain 'Flash'. I REALLY don't want to search by hand.
Last edited by Don Cragun; 10-30-2013 at 05:54 PM..
Reason: Add CODE tags.
Hello again, I'm still working on the redo of my script I created before and came across a grep question.
I'm on SunOS 5.9 and using the Korn Shell. I'm writing a function to check for validation of root disks being mirrored. If the server allows me to use metastat, I'm looking to show it has... (4 Replies)
suppose i have a file structure(serial file)--
----------
----------
---------
summery
--------
------
--------
finished
-----
-------
i want to fetch lines from summery to finished
i can get line of summery by grep command. but how can i fetch lines untill it reaches finished.probably... (2 Replies)
Hi
I am writing a script which should read a file and search for certain strings 'approved' or 'removed' and retain only those lines that contain the above strings.
Ex: file name 'test'
test:
approved package
waiting for approval package
disapproved package
removed package
approved... (14 Replies)
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
I have several very large file that are extracts from Oracle tables. These files are formatted in XML type syntax with multiple entries like:
<ROW>
some information
more information
</ROW>
I want to grep for some words, then print all lines between <ROW> AND </ROW>. Can this be done with AWK?... (7 Replies)
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
LIGHTSPARK(1) General Commands Manual LIGHTSPARK(1)NAME
lightspark - a free Flash player
SYNOPSIS
lightspark [--url|-u http://loader.url/file.swf] [--disable-interpreter|-ni] [--enable-jit|-j] [--log-level|-l 0-4] [--parameters-file|-p
params-file] [--version|-v] file.swf
DESCRIPTION
Lightspark is a free, modern Flash Player implementation, this documents the options accepted by the standalone version of the program.
The player is currently in Beta, support for any particular SWF file is not guaranteed
You might wish to see the project website at http://lightspark.sf.net or our technical blog at http://allievi.sssup.it/techblog
OPTIONS --url loader.url/file.swf, -u loader.url/file.swf
Pretends to be loading the file from an url
--disable-interpreter, -ni
Disable the ActionScript interpreter
--enable-jit, -j
Enable the ActionScript JIT compilation engine
--log-level 0-4, -l 0-4
Sets the verbosity of the output, the default is 2
--parameters-file params-file, -p params-file
Load flash parameters from file. Every odd line will be interpreted as a parameter name, with the following one as the value.
--profiling-output profiling-file, -o profiling-file
Output profiling data to profiling-file in a callgrind/KCachegrind compatible format
--version, -v
Shows lightspark version and exits.
AUTHOR
lightspark was written by Alessandro Pignotti.
This manual page was written by Jacopo Corbetta <j.corbetta@sssup.it>, for the Debian project (and may be used by others).
May 29, 2010 LIGHTSPARK(1)