01-29-2011
grep multiple matches
i dun seems to be able to grep the arguments i want.
eg. book.txt with description inside.
ABC:efg:5:6
HHH:JJJ:6:7
i want the user to input the book title and author they want. so when the user enters book title ABC and book author efg, they print out exact match of ABC:efg:5:6. Caps do matters here. Anyone can help?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm currently digging for a way to append a line to a text file where each line begins with the word "setmqaut". This is a continuation of my IBM MQSeries backup script I'm working on to make my life a little easier.
What I would like to do is have each line that looks like this:
setmqaut -m... (4 Replies)
Discussion started by: sysera
4 Replies
2. Shell Programming and Scripting
Hello,
I am searching all over the place for this, just not finding anything solid :(
I want to do be able to access the groups that are matched with grep (either with extended regex, or perl compatible regex). For instance:
echo "abcd" | egrep "a(b(c(d)))"
Of course this returns... (1 Reply)
Discussion started by: Rhije
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I looking to use grep to return a string with exactly n matches.
I'm building off this:
ls -aLl /bin | grep '^.\{9\}x' | tr -s ' '
-rwxr-xr-x 1 root root 632816 Nov 25 2008 vi
-rwxr-xr-x 1 root root 632816 Nov 25 2008 view
-rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Discussion started by: MykC
7 Replies
4. Shell Programming and Scripting
Hi all!
I've faced with very unintelligible error using find/grep like this:
root@v29221:~# find /var/www/igor/data/www/lestnitsa.ru | grep u28507I get nothing as a result, but:
root@v29221:~# grep u28507 /var/www/igor/data/www/lestnitsa.ru/_var.inc
$db_name = 'u28507';... (2 Replies)
Discussion started by: ulrith
2 Replies
5. Shell Programming and Scripting
I’m trying to modify someone perl script to fix a bug. The piece of code checks that the zone name you want to add is unique. However, when the code runs, it finds a partial match using grep, and decides it already exists, so the “create” command exits.
$cstatus = `${ZADM} list -vic | grep... (3 Replies)
Discussion started by: TKD
3 Replies
6. Shell Programming and Scripting
Hi All,
I'm trying to grep for 3 patterns in a string of gibberish. It so happens that each line is appended by a date/time stamp and i was able to figure out how to extract only the datetime.
here is the string..
i have to display
tinker tailor soldier spy
Please can some help... (2 Replies)
Discussion started by: Irishboy24
2 Replies
7. Shell Programming and Scripting
Hi guys,
As the title, I want to take out the lines in file2 if the TCONS_* matches that in file1. Then put the lines in a file3. The TCONS numbers ranges from TCONS_00000024 to TCONS_00381684. Those numbers are continuous in file2, not in file1. Below is just some lines of file1 and file2
... (4 Replies)
Discussion started by: lyni2ULF
4 Replies
8. Shell Programming and Scripting
Hi all...
Can somebody pls help me with this...
I have a directory (dir1) which has many subdirectories(vr001,vr002,vr003..) with each subdir containing similar text file(say ras.txt).
I have another directory(dir2) which has again got some subdir(vr001c,vr002c,vr003c..) with each subdir... (0 Replies)
Discussion started by: bramya07
0 Replies
9. Shell Programming and Scripting
Dear All,
Here is my input
TAACGCACTTGCGGCCCCGGGATAAAAAAAAAAAAAAAAAAAAATGGATT
NAGAGGGACGGCCGGGGGCATAAAAAAAAAAAAAAAAAAAAAGGGATTTC
NGGGTTTTAAGCAGGAGGTGTCAAAAAAAAAAAAAAAAAAAAAGGGATTT
NTGGAACCTGGCGCTAGACCAAAAAAAAAAAAAAAAAAAATGGATTTTTG
ATACTTACCTGGCAGGGGAGATACCATGATCAATAAAAAAAAAAAAAAAA... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
10. Shell Programming and Scripting
Hi,
I know that
echo "bob alice robert alice" | awk '{print index($0,"alice")}'
5Will output the index of the first alice match, is there any way to get the index of all matches?, eg:
echo "bob alice robert alice" | awk 'unknown magic'
5:18Thanks for your time. (6 Replies)
Discussion started by: chilicuil
6 Replies
LEARN ABOUT DEBIAN
ebook-meta
EBOOK-META(1) calibre EBOOK-META(1)
NAME
ebook-meta - part of calibre
SYNOPSIS
ebook-meta ebook_file [options]
DESCRIPTION
Read/Write metadata from/to ebook files.
Supported formats for reading metadata: azw, azw1, azw3, azw4, cbr, cbz, chm, epub, fb2, html, htmlz, imp, lit, lrf, lrx, mobi, odt,
oebzip, opf, pdb, pdf, pml, pmlz, pobi, prc, rar, rb, rtf, snb, tpz, txt, txtz, updb, zip
Supported formats for writing metadata: azw, azw1, azw3, azw4, epub, htmlz, lrf, mobi, pdb, pdf, prc, rtf, tpz, txtz
Different file types support different kinds of metadata. If you try to set some metadata on a file type that does not support it, the
metadata will be silently ignored.
Whenever you pass arguments to ebook-meta that have spaces in them, enclose the arguments in quotation marks.
OPTIONS
--version
show program's version number and exit
-h, --help
show this help message and exit
-t, --title
Set the title.
-a, --authors
Set the authors. Multiple authors should be separated by the & character. Author names should be in the order Firstname Lastname.
--title-sort
The version of the title to be used for sorting. If unspecified, and the title is specified, it will be auto-generated from the
title.
--author-sort
String to be used when sorting by author. If unspecified, and the author(s) are specified, it will be auto-generated from the
author(s).
--cover
Set the cover to the specified file.
-c, --comments
Set the ebook description.
-p, --publisher
Set the ebook publisher.
--category
Set the book category.
-s, --series
Set the series this ebook belongs to.
-i, --index
Set the index of the book in this series.
-r, --rating
Set the rating. Should be a number between 1 and 5.
--isbn Set the ISBN of the book.
--tags Set the tags for the book. Should be a comma separated list.
-k, --book-producer
Set the book producer.
-l, --language
Set the language.
-d, --date
Set the published date.
--get-cover
Get the cover from the ebook and save it at as the specified file.
--to-opf
Specify the name of an OPF file. The metadata will be written to the OPF file.
--from-opf
Read metadata from the specified OPF file and use it to set metadata in the ebook. Metadata specified on the command line will over-
ride metadata read from the OPF file
--lrf-bookid
Set the BookID in LRF files
SEE ALSO
The User Manual is available at http://manual.calibre-ebook.com
Created by Kovid Goyal <kovid@kovidgoyal.net>
ebook-meta (calibre 0.8.51) January 2013 EBOOK-META(1)