Assistance Required - manipulating records


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Assistance Required - manipulating records
# 8  
Old 10-26-2011
thanks - you may close

I appreciate everyone's help.

Last edited by mcclunyboy; 10-26-2011 at 06:36 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Assistance required to decode sed search using /1

Hi, I am trying to extract line number (first number), as well as everything from TSVal onwards. 4 1.474005 172.18.124.142 -> 74.125.228.46 TCP 2450940617 74 44021 > https Seq=0 Win=5840 Len=0 MSS=1380 SACK_PERM=1 TSval=2450940617 TSecr=0 WS=64 6 1.488149 172.18.124.142 ->... (1 Reply)
Discussion started by: sand1234
1 Replies

2. Shell Programming and Scripting

Manipulating Data Records for reporting

Hello All, I have Data Records (DRs) with the following format: ... (2 Replies)
Discussion started by: EAGL€
2 Replies

3. Shell Programming and Scripting

UNIX Script required for count the records in table

Hi Friends, I looking for the script for the count of the records in table. and then it's containg the zero records then should get abort. and should notify us through mail. Can you please help me out in this area i am lacking. (5 Replies)
Discussion started by: victory
5 Replies

4. Shell Programming and Scripting

Assistance required with awk and regular expressions

Hello there, I am trying to get my head around the section below of a script we use that incorporates AWK and Regular Expressions. { match($0,"The broker*");print $1,$2,$3 ":", substr($0, RSTART,RLENGTH)} I have a basic understanding of how match works, what I am struggling with is the... (2 Replies)
Discussion started by: jimbojames
2 Replies

5. Shell Programming and Scripting

Compare two files with different number of records and output only the Extra records from file1

Hi Freinds , I have 2 files . File 1 |nag|HYd|1|Che |esw|Gun|2|hyd |pra|bhe|3|hyd |omu|hei|4|bnsj |uer|oeri|5|uery File 2 |nag|HYd|1|Che |esw|Gun|2|hyd |uer|oi|3|uery output : (9 Replies)
Discussion started by: i150371485
9 Replies

6. Hardware

Assistance required when booting M3000, error shows; * MBU_A Status:Degraded; Ver:0701h; Serial:

Here is the error showing in the XCSF, can anyone recommend further diagnosis for this specific error?; XSCF> showhardconf SPARC Enterprise M3000; + Serial:PX61142029; Operator_Panel_Switch:Locked; + Power_Supply_System:Single; SCF-ID:XSCF#0; + System_Power:On;... (4 Replies)
Discussion started by: Touchpoint
4 Replies

7. UNIX for Dummies Questions & Answers

Grep specific records from a file of records that are separated by an empty line

Hi everyone. I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this: ID: 20 Name: X Age: 19 ID: 21 Name: Z ID: 22 Email: xxx@yahoo.com Name: Y Age: 19 I want to grep records that... (4 Replies)
Discussion started by: Atrisa
4 Replies

8. Shell Programming and Scripting

Getting required fields from a test file in required fromat in unix

My data is something like shown below. date1 date2 aaa bbbb ccccc date3 date4 dddd eeeeeee ffffffffff ggggg hh I want the output like this date1date2 aaa eeeeee I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies

9. Shell Programming and Scripting

Based on num of records in file1 need to check records in file2 to set some condns

Hi All, I have two files say file1 and file2. I want to check the number of records in file1 and if its atleast 2 (i.e., 2 or greater than 2 ) then I have to check records in file2 .If records in file2 is atleast 1 (i.e. if its not empty ) i have to set some conditions . Could you pls... (3 Replies)
Discussion started by: mavesum
3 Replies

10. Shell Programming and Scripting

awk script required for finding records in 1 file with corresponding another file.

Hi, I have a .txt file (uniqfields.txt) with 3 fields separated by " | " (pipe symbol). This file contains unique values with respect to all these 3 fields taken together. There are about 40,000 SORTED records (rows) in this file. Sample records are given below. 1TVAO|OVEPT|VO... (2 Replies)
Discussion started by: RRVARMA
2 Replies
Login or Register to Ask a Question
DBS_UPDATE(1p)						User Contributed Perl Documentation					    DBS_UPDATE(1p)

NAME
dbs_update - Update SQL Databases DESCRIPTION
dbs_update is an utility to update SQL databases from text files. FORMAT OF THE TEXT FILES dbs_update assumes that each line of the input contains a data record and that the field within the records are separated by tabulators. You can tell dbs_update about the input format with the --format option. The first field of the data record is used as table specification. These consists of the table name and optionally the index of starting column, separated by a dot. Alternatively dbs_update can read the column names from the first line of input (see the -h/--headline option). These can even be aliases for the real column names (see the -m/--map option). COMMAND LINE PARAMETERS
Required command line parameters are the DBI driver ("Pg" for Postgres or "mysql" for MySQL) and the database name. The third parameter is optionally and specifies the database user and/or the host where the database resides ("racke", "racke@linuxia.de" or "@linuxia.de"). OPTIONS
--cleanse Removes all records which remain unaffected from the update process. The same result as deleting all records from the table first and then running dbs_update, but the table is not empty in the meantime. -c COLUMN,COLUMN,..., --columns=COLUMN,COLUMN,... Update only the table columns given by the COLUMN parameters. To exclude columns from the update prepend "!" or "^" to the parameters. --rows=ROW,ROW,... Update only the input rows given by the ROW parameters. The first row is 1 where headlines doesn't count. To exclude rows from the update prepend "!" or "^" to the parameters. -f FILE, --file=FILE Reads records from file FILE instead of from standard input. --format=FORMAT[SEPCHAR] Assumes FORMAT as format for the input. Only CSV can be specified for now, default is TAB. The default field separator for CSV is a comma, you may change this by appending the separator to the format. -h, --headline Reads the column names from the first line of the input instead of dedicting them from the database layout. Requires the -t/--table option. -k COUNT, -k KEY,KEY,..., --keys=COUNT, --keys=KEY,KEY,... Specifies the keys for the table(s) either as the number of columns used as keys or by specifying them explicitly as comma separated argu- ments to the option. This is used for the detection of existing records. -m ALIASDEF, --map=ALIASDEF Maps the names found in the first line of input to the actual column names in the database. The alias and the column name are separated with "=" signs and the different entries are separated by ";" signs, e.g. "Art-No.=code;Short Description=shortdescr'". --map-filter=FILTER Applies a filter to the column names read from the input file. Currently there is only the "lc" filter available. --match-sql=FIELD:{STATEMENT} Updates only records where the value of the column FIELD is in the result set of the SQL statement STATEMENT, e.g. "category:{select dis- tinct name from categories}". -o, --update-only Updates existing database entries only, stops if it detects new ones. -r ROUTINE, --routine=ROUTINE Applies ROUTINE to any data record. ROUTINE must be a subroutine. dbs_update passes the table name and a hash reference to this subrou- tine. The keys of the hash are the column names and the values are the corresponding field values. If the return value of ROUTINE is not a truth value, the data record will be skipped. "sub {my ($table, $valref) = @_; unless (defined $$valref{country} && $$valref{country} !~ /S/) { $$valref{country} = "Germany"; } 1; }" --skipbadlines Lines not matching the assumed format are ignored. Without this option, dbs_update simply stops. -t TABLE, --table=TABLE Uses TABLE as table name for all records instead of the first field name. AUTHOR
Stefan Hornburg (Racke), racke@linuxia.de SEE ALSO
perl(1), DBIx::Easy(3) perl v5.8.8 2007-02-01 DBS_UPDATE(1p)