03-03-2008
Do you want to extract both lines in same command?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file containing the following contents
All of us, including Zippy, our dog
All of us, including Zippy and Zippy
All of us, including Zippy and Zippy and Zelda
Testing All of us Zippy
Now, i wanna grep and get the lines which has only one occurance of word Zippy and starting with... (1 Reply)
Discussion started by: google_ever
1 Replies
2. Shell Programming and Scripting
Hi all,
I need to extract some lines from a file based on a condition. For ex:
My file will contain 50 lines and i need to extract line which has "File" in it and then the line which has "date" in it. Which command will be the most efficient way to do it. I have tried two ways
1.... (1 Reply)
Discussion started by: pradeepthanraj
1 Replies
3. Shell Programming and Scripting
Hi,
I have a sql file and i need to extract the table names used in the sql file using a unix script. If i can extract the lines between the keywords 'FROM' and 'WHERE' in the file, my job is done. can somebody tell me how to do this using a shell script. If u can just let me know, how to... (2 Replies)
Discussion started by: babloo
2 Replies
4. Shell Programming and Scripting
I have a file with 14million lines and I would like to extract all the unique lines from the file into another text file.
For example:
Contents of file1
happy
sad
smile
happy
funny
sad
I want to run a command against file one that only returns the unique lines (ie 1 line for happy... (3 Replies)
Discussion started by: soliberus
3 Replies
5. Shell Programming and Scripting
Hi,
anyone has any ideas on how do we extract lines from a file with format similiar to this: (based on current time)
Jun 18 00:16:50 .......... ............. ............
Jun 18 00:17:59 .......... ............. ............
Jun 18 01:17:20 .......... ............. ............
Jun 18... (5 Replies)
Discussion started by: faelric
5 Replies
6. Shell Programming and Scripting
hi all,
i searched in unix.com and accquired the following commands for extracting specific lines from a file ..
sed -n '16482,16482p' in.sql > out.sql
awk 'NR>=10&&NR<=20' in.sql > out.sql....
these commands are working fine if i give the line numbers as such .. but if i pass a... (2 Replies)
Discussion started by: sais
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
We have a file where we need to extract the lines of a file based on the first three characters of every line in that file.
Eg:
RAM hill station
SAM student
RAM rose
SAM apple
RAM india
SAM australia
RAM happy
RAM heaven
SAM smile
RAM glow
So, all the lines that start... (5 Replies)
Discussion started by: pyaranoid
5 Replies
8. Shell Programming and Scripting
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)
Discussion started by: Wynner
3 Replies
9. Shell Programming and Scripting
consider i have two files
cat onlyviews1.sql
CREATE VIEW V11
AS
SELECT id,
name,
FROM
etc etc
WHERE etc etc;
CREATE VIEW V22
AS
SELECT id,
name,
FROM
etc etc
WHERE etc etc;
CREATE VIEW V33
AS (10 Replies)
Discussion started by: vivek d r
10 Replies
10. Shell Programming and Scripting
consider the input file which i am dealing with looks like this..
#cat 11.sql
create table abc (
.
.
.
) engine=Innodb ;
.
.
etc
.
.
.
create table UsM (
blah
blah
blah
) engine=Innodb ; (5 Replies)
Discussion started by: vivek d r
5 Replies
LEARN ABOUT DEBIAN
bup-meta
bup-meta(1) General Commands Manual bup-meta(1)
NAME
bup-meta - create or extract a metadata archive
SYNOPSIS
bup meta --create
[-R] [-v] [-q] [--no-symlinks] [--no-paths] [-f file] <paths...>
bup meta --list
[-v] [-q] [-f file]
bup meta --extract
[-v] [-q] [--numeric-ids] [--no-symlinks] [-f file]
bup meta --start-extract
[-v] [-q] [--numeric-ids] [--no-symlinks] [-f file]
bup meta --finish-extract
[-v] [-q] [--numeric-ids] [-f file]
DESCRIPTION
bup meta either creates or extracts a metadata archive. A metadata archive contains the metadata information (timestamps, ownership,
access permissions, etc.)
for a set of filesystem paths.
OPTIONS
-c, --create
Create a metadata archive for the specified paths. Write the archive to standard output unless --file is specified.
-t, --list
Display information about the metadata in an archive. Read the archive from standard output unless --file is specified.
-x, --extract
Extract a metadata archive. Conceptually, perform --start-extract followed by --finish-extract. Read the archive from standard
input unless --file is specified.
--start-extract
Build a filesystem tree matching the paths stored in a metadata archive. By itself, this command does not produce a full restora-
tion of the metadata. For a full restoration, this command must be followed by a call to --finish-extract. Once this command has
finished, all of the normal files described by the metadata will exist and be empty. Restoring the data in those files, and then
calling --finish-extract should restore the original tree. The archive will be read from standard input unless --file is specified.
--finish-extract
Finish applying the metadata stored in an archive to the filesystem. Normally, this command should follow a call to --start-
extract. The archive will be read from standard input unless --file is specified.
-f, --file=filename
Read the metadata archive from filename or write it to filename as appropriate. If filename is "-", then read from standard input
or write to standard output.
-R, --recurse
Recursively descend into subdirectories during --create.
--numeric-ids
Apply numeric user and group IDs (rather than text IDs) during --extract or --finish-extract.
--symlinks
Record symbolic link targets when creating an archive, or restore symbolic links when extracting an archive (during --extract or
--start-extract). This option is enabled by default. Specify --no-symlinks to disable it.
--paths
Record pathnames when creating an archive. This option is enabled by default. Specify --no-paths to disable it.
-v, --verbose
Be more verbose (can be used more than once).
-q, --quiet
Be quiet.
EXAMPLES
# Create a metadata archive for /etc.
$ bup meta -cRf etc.meta /etc
bup: removing leading "/" from "/etc"
# Extract the etc.meta archive (files will be empty).
$ mkdir tmp && cd tmp
$ bup meta -xf ../etc.meta
$ ls
etc
# Restore /etc completely.
$ mkdir tmp && cd tmp
$ bup meta --start-extract -f ../etc.meta
...fill in all regular file contents using some other tool...
$ bup meta --finish-extract -f ../etc.meta
BUGS
Hard links are not handled yet.
BUP
Part of the bup(1) suite.
AUTHORS
Rob Browning <rlb@defaultvalue.org>.
Bup unknown- bup-meta(1)