Not really. If you were dealing with a very large file and there were many lines remaining after printing the target, both approaches could continue reading the entire file. I say "could" because some sed implementations, when using -n, will abort once they know that there's no possibility of an address matching further input (I believe I saw such an optimization in gnu sed a while back).
To ensure that sed doesn't continue reading needlessly, use q:
Regards,
Alister
I have a shell script and want to assign a value to a variable. The value is the line exctrated from a file using the line number. The line number it is not fix, and could change any time.
I have tried sed, awk, head .. See my script
# Get randome line number from the file
#selectedline = `awk... (1 Reply)
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Hello,
I am having trouble extracting a specific line from a file when the line number is known. My first attempt involved grep -n 'hi' (the word 'hi will always be there) to get the line number before the line that I actually want (line 4).
Extra Notes:
-I am working in a bash script.
-The... (7 Replies)
Hi
I want to extract certain text between two line numbers like
23234234324 and
54446655567567
How do I do this with a simple sed or awk command?
Thank you.
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
found it:
sed -n '#1,#2p'... (1 Reply)
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Dear all,
I am trying to extract a number from a line in one file (task 1), duplicate another file (task 2) and replace all instances of the strings 300, in duplicated with the extracted number (task 3). Here is what I have tried so far:
for ((k=1;k<4;k++)); do
temp=`sed -n "${k}p"... (2 Replies)
Hi,
I search all forum, but I can not find solutions of my problem :(
I have multiple files (5000 files), inside there is this data :
FILE 1:
1195.921 -898.995 0.750312E-02-0.497526E-02 0.195382E-05 0.609417E-05
-2021.287 1305.479-0.819754E-02 0.107572E-01 0.313018E-05 0.885066E-05
... (15 Replies)
I have a LOG file which looks like this
Import started at: Mon Jul 23 02:13:01 EDT 2012
Initialization completed in 2.146 seconds.
--------------------------------------------------------------------------------
--
Import summary for Import item: PolicyInformation... (8 Replies)
In the below perl code I am using tags within each line to extract certain information. The tags that are used are:
STB >0.8 is STRAND BIAS otherwise GOOD
FDP is the second number
GO towards the end of the line is read into an array and the value returned is outputed, in the first line that... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT SUSE
tracker-extract
tracker-extract(1) User Commands tracker-extract(1)NAME
tracker-extract - Extract metadata from a file.
SYNOPSYS
tracker-extract [OPTION...] FILE...
DESCRIPTION
tracker-extract reads the file and mimetype provided in stdin and extract the metadata from this file; then it displays the metadata on the
standard output.
NOTE: If a FILE is not provided then tracker-extract will run for 30 seconds waiting for DBus calls before quitting.
OPTIONS
-?, --help
Show summary of options.
-v, --verbosity=N
Set verbosity to N. This overrides the config value. Values include 0=errors, 1=minimal, 2=detailed and 3=debug.
-f, --file=FILE
The FILE to extract metadata from. The FILE argument can be either a local path or a URI. It also does not have to be an absolute
path.
-m, --mime=MIME
The MIME type to use for the file. If one is not provided, it will be guessed automatically.
-d, --disable-shutdown
Disable shutting down after 30 seconds of inactivity.
-i, --force-internal-extractors
Use this option to force internal extractors over 3rd parties like libstreamanalyzer.
-m, --force-module=MODULE
Force a particular module to be used. This is here as a convenience for developers wanting to test their MODULE file. Only the MOD-
ULE name has to be specified, not the full path. Typically, a MODULE is installed to /usr/lib/tracker-0.7/extract-modules/. This
option can be used with or without the .so part of the name too, for example, you can use --force-module=foo
Modules are shared objects which are dynamically loaded at run time. These files must have the .so suffix to be loaded and must con-
tain the correct symbols to be authenticated by tracker-extract. For more information see the libtracker-extract reference documen-
tation.
-V, --version
Show binary version.
EXAMPLES
Using command line to extract metadata from a file:
$ tracker-extract -v 3 -f /path/to/some/file.mp3
Using a specific module to extract metadata from a file:
$ tracker-extract -v 3 -f /path/to/some/file.mp3 -m mymodule
ENVIRONMENT
TRACKER_EXTRACTORS_DIR
This is the directory which tracker uses to load the shared libraries from (used for extracting metadata for specific file types).
These are needed on each invocation of tracker-store. If unset it will default to the correct place. This is used mainly for testing
purposes.
FILES
$HOME/.config/tracker/tracker-extract.cfg
SEE ALSO tracker-store(1), tracker-sparql(1), tracker-stats(1), tracker-info(1).
tracker-extract.cfg(5).
/usr/lib/tracker-0.7/extract-modules/
GNU July 2007 tracker-extract(1)