03-27-2009
Hello
The script is not working.
this is the error
Syntax Error The source line is 1.
The error context is
<<< NR == 1 || /.H... / && _++ { >>>
awk: 0602-502 The statement cannot be correctly parsed. The source line is 1.
Syntax Error The source line is 2.
The sample data is only for four invoices. The input data might contain any number of invoices but the requirement is to produce 2 invoices in a file each.
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to split a file based on certain context inside the file. Is there a unix command that can do this? I have looked into split and csplit but it does not seem like those would work because I need to split this file based on certain text. The file has multiple records and I need to split this... (1 Reply)
Discussion started by: matrix1067
1 Replies
2. Shell Programming and Scripting
Hi,
I'm, new to shell scripting, I have a requirement where I have to split an incoming file into separate files each containing a maximum of 3 million rows.
For e.g: if my incoming file say In.txt has 8 mn rows then I need to create 3 files, in which two will 3 mn rows and one will contain 2... (2 Replies)
Discussion started by: wahi80
2 Replies
3. Shell Programming and Scripting
Dear friends,
I receive the following files into a FTP location on a daily basis
-rw-r----- 1 guest ftp1 5021 Aug 19 09:03 CHECK_TEST_Extracts_20080818210000.zip
-rw-r----- 1 guest ftp1 2437 Aug 20 05:15 CHECK_TEST_Extracts_20080819210000.zip
-rw-r----- 1 guest ... (2 Replies)
Discussion started by: sureshg_sampat
2 Replies
4. Shell Programming and Scripting
Hi there,
I've an input file as follows:
*START
1001 a1
1002 a2
1003 a3
1004 a4
*END
*START
1001 b1
1002 b2
1004 b4
*END
*START
1001 c1
1004 c4
*END (6 Replies)
Discussion started by: kbirde
6 Replies
5. UNIX for Dummies Questions & Answers
I have an input file of this format
<Date><other data>
For example,
20081213aaaaaaaaa
20081213bbbbbbbbb
20081220ccccccccc
20081220ddddddddd
20081220eeeeeeeee
20081227ffffffffffffff
The first 8 chars are date in YYYYMMDD formT. I need to split this file into n files where n is the... (9 Replies)
Discussion started by: paruthiveeran
9 Replies
6. Shell Programming and Scripting
I have file as shown below. Would like to split the file based on the context of data.
Like, split the content between "---- XXX Info ----" and "
---- YYY Info ----" to a file.
When I try using below command, 2nd file contains all the info starting after first "---- YYYY Info ----" instance.... (8 Replies)
Discussion started by: webkid
8 Replies
7. Shell Programming and Scripting
Hi all,
I have a file (say file.txt) which contains comma-separated rows. Each row has seven columns. Only column 4 or 5 (not both) can have empty values like "" in each line.
Sample lines
So, now i want all the rows that have column 4 as "" go in file1.txt and all the rows that have column... (8 Replies)
Discussion started by: jakSun8
8 Replies
8. Shell Programming and Scripting
I have a file as below
pema.txt
s2dhshfu dshfkdjh dshfd
rjhfjhflhflhvflxhvlxhvx vlvhx
sfjhldhfdjhldjhjhjdhjhjxhjhxjxh
sjfdhdhfldhlghldhflhflhfhldfhlsh
rjsdjh#error occured#
skjfhhfdkhfkdhbvfkdhvkjhfvkhf
sjkdfhdjfh#error occured#
my requirement is to create 3 files frm the... (8 Replies)
Discussion started by: pema.yozer
8 Replies
9. Shell Programming and Scripting
Hi I have a file with over a million lines (rows) and I want to split everything from 500,000 to a million into another file (to make the file smaller). Is there a simple command for this?
Thank you
Phil (4 Replies)
Discussion started by: phil_heath
4 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am having a problem. I tried to extract the chunk of data and tried to fix I am not able to. Any help please
Basically I need to remove the for , values after K,
this is how it is now
A,,
B,
C,C,
D,D,
12/04/10,12/04/10,
K,1,1,1,1,0,3.0,
K,1,1,1,2,0,4.0,... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
LEARN ABOUT DEBIAN
ledgersmb::file
LedgerSMB::File(3pm) User Contributed Perl Documentation LedgerSMB::File(3pm)
NAME
LedgerSMB::File - Provides routines for managing file attachments.
SYNPSIS
This provides routines for managing file attachments. Subclasses may be used to provide functionality for specific types of file
attachments.
PROPERTIES
/ACCESSORS
attached_by_id
Entity id of the individual who attached the file.
attached_by
Entity name of individual who attached file
attached_at
Timestamp of attachment point.
content
This stores the binary content of the file.
mime_type_id
ID of the MIME type. Undef if unknown.
mime_type_text
Standard text code of the MIME type
file_name
File name, user specified
description
Description, user specified
id ID of file. undef if unknown
ref_key
Referential key for the file to attach to.
reference
Reference control code (text string) for attached financial database object.
file_class
ID of the file class.
src_class
ID of class of the original attachment point (for a link)
file_path
Path, relative to $LedgerSMB::tempdir, where file data is stored (for LaTeX use of attached images).
dbobject
Object for db interface.
sizex
X axis dimensions, if Image::Size is installed and file is image (only on files retrieved for invoices).
sizey
Y axis dimensions, if Image::Size is installed and file is image (only on files retrieved for invoices).
x_info
A hash for extended information
Note additionally the $self hashref contains the basic required attributes for DBObject, namely dbh, _roles, and _locale.
METHODS
new Returns a blessed object
to_hashref
Returns a hashref of properties for the object.
new_dbobject
$file->new_dbobject({base => (LedgerSMB | LedgerSMB::Form), locale => LedgerSMB::Locale});
Creates a new file object. Locale only needs to be specified when using LedgerSMB::Form objects since these are not included.
Returns 0 on success.
Error codes on exit (OR'd):
1: No database handle included 2: No locale handle included 4: Invalid base.
In most cases when working with new code it is simpler to just
$file->dbobject(LedgerSMB::DBObject->new({base => $request});
get_mime_type
Sends the textual representation of the MIME type. If not set, retrieves and sets it.
set_mime_type
Sets the mipe_type_id from the mime_type_text
detect_type
Auto-detects the type of the file. Not yet implemented
get Retrives a file. ID and file_class properties must be set.
get_for_template({ref_key => int, file_class => int})
Returns file data for invoices for embedded images, except that content is set to a directive relative to tempdir where these files are
stored.
list({ref_key => int, file_class => int})
Lists files directly attached to the object.
list_links({ref_key => int, file_class => int})
Lists the links directly attached to the object.
exec_method
Provides a compatible interface to LedgerSMB::DBObject::exec_method
merge(hashref)
Merges in specific attributes from the ref.
commit()
Returns the value of DBI->commit
COPYRIGHT
Copyright (C) 2011 The LedgerSMB Core Team
This file is licensed under the Gnu General Public License version 2, or at your option any later version. A copy of the license should
have been included with your software.
perl v5.14.2 2012-05-14 LedgerSMB::File(3pm)