Extract value from delimited file base on white list
I would like to use a variable to store the IDs that I would like to extract.
I would like to extract a list of values of the IDs from a delimited string. Using bash here.
file format would be
The number of fields and records is not fixed. There could be just one id stored, or it could go on and on. Each record is separated by a new line and Each record starts with some random redundant text that I am not interested in..
I am trying out the code below
if the id is less than/equal 10 i would like to print the value
if the id value is more than 10.. i would like to print the id name out as well. eg (id9=11)
i have a file in unix in which datas are like this
07 01 abc data entry Z3 data entry ASSISTANT Z3 39
08 01 POD peadiatrist Z4 POD PeDIATRY Z4 67
01 operator specialist 00 operator UNSPECIFIED A0 00
... (12 Replies)
the data in my file is has no delimiters. it looks like this:
H52082320024740010PH333200612290000930 0.0020080131
D5208232002474000120070306200703060580T1502 TT 1.00
H52082320029180003PH333200702150001 30 100.0020080205
D5208232002918000120070726200707260580T1502 ... (3 Replies)
I'm trying to extract all the lines between 2 strings (including the lines containing the strings)
To make the strings unique I need to include white space if possible. I'm not certain how to do that.
sed -n '/ string1 /,/string2/p' infile > outfile & (4 Replies)
I have a file with the contents below
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
jan_t=null;feb_t=feb;mar_t=mar;year=2010
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
I want to extract out all the fields values ending with "_t" , however, i want to exclude feb_t and mar_t from the results
In... (6 Replies)
I need to extract all text delimited from <name> and </name> tags from an xml file, but not only first occurence. I need to extract all occurences.
I've tried with this command:
awk -F"<name>|</name>" 'NF>2{print $2}'
but it give only first occurence. How can i modify it? (18 Replies)
I have a file which looks like this:
73450 articles and news developmental psychology 2006-03-30 16:22:40 1 http://www.usnews.com
73450 articles and news developmental psychology 2006-03-30 16:22:40 2 http://www.apa.org
73450 articles and news developmental psychology 2006-03-30... (1 Reply)
Hi,
In my file (which is "," delimited and text qualifier is "), I have to extract a particualr field.
file1:
1,"aa,b",4
expected is the 2nd field:
aa,b
I tried the basic cut -d "," -f 2 file 1, this gave me
aa alone instead aa,b.
A small hint ot help on this will be very... (5 Replies)
Hi All,
I am writing a shell script to extract oracle table into a pipe dilemited flat file. Below is my code and I have attached two files that I have abled to generate so far.
1. Table.txt ==> database extract file
2. flat.txt ==> pipe delimited after some manipulation of the original db... (5 Replies)
I need to list and delete all files in current older which are olderthan 7 days. But my file names have white spaces. Before deleting I want to list all the files, so that I can verify.find . -type f -mtime +7 | xargs ls -l {}
But the ls command is the working on the files which have white... (16 Replies)
Hi All,
we have a requirement to split a content in a text file every 5 rows and write in a new file .
conditions:
if 5th line falls between center of the statement . it should look upto after ";"
files are below format:
1 UPDATE TABLE TEST1 SET VALUE ='AFDASDFAS'
2 WHERE... (3 Replies)
Discussion started by: KK230689
3 Replies
LEARN ABOUT DEBIAN
xview_xgettext
xgettext(1) General Commands Manual xgettext(1)NAME
xgettext - conditionally extract strings from C programs
SYNOPSIS
xgettext -d [ cmnopvhP ] [ -odirectory-prefix ] [ -xexclude-list ] [ filename ... ]
xgettext [ -amopvhP ] [ -xexclude-list ] [ filename ... ]
DESCRIPTION
xgettext is used to automate the creation of portable message files. A portable message file contains copies of "C" strings that are found
in "C" source code in filename. When the -d option is specified, xgettext places the extracted strings in the file name.po. name is
either the domain specified in a dgettext call, or messages.po for strings extracted from gettext and textdomain calls. If the -d flag is
not specified, xgettext places all the strings in messages.po. The portable message file can be used as input to the msgfmt(1) utility,
which will produce a binary form of the message file than can be used at application run-time.
OPTIONS -a Extract ALL strings, not just those found in gettext, dgettext, and textdomain calls.
-cflag Comments beginning with flag filename on the first line of the comment are added to file filename as # delimited comments.
-d Produce duplicates. Does not sort output when writing the portable message file and will not overwrite existing output files.
Places output from each domain specified in a dgettext call into a separate file named for the domain, ie. name.po
-cflag Comments beginning with flag filename on the first line of the comment are added to file filename as # delimited comments.
-mstring Causes xgettext to fill in the msgstr line of the portable message files it produces. xgettext uses the corresponding msgid
string extracted from the "C" file, appending string. Useful for debugging purposes.
-n Add # delimited line number comments to output file indicating the line number in the source file where each extracted string is
encountered.
-ofilename
rename the default output file from messages.po to filename.
-ppathname
Specify the directory where the output files will be placed. This option overrides the current working directory.
-xfilename
Specify a file that contains a list of strings that are not be extracted from the input files. Each string to be excluded must
appear on a line by itself in the file filename.
-P include strings in pre-processor statements.
-v Verbose mode.
-h Print a help message on standard output.
FILES
messages.po is always created, but may be empty.
SEE ALSO msgfmt(1), xstr(1), gettext, dgettext, textdomain(3).
14 Sep 1990 xgettext(1)