03-16-2006
yes you are right, it is more complex as but there are fields after the address field (in fact another 10 or so) . I assume your code has concatenated $3 and $4 and I agree that if they were the last fields in the record then this wouldnt be a problem, but they arent, so concatenating them would put all the subsequent fields out of line...apologies..I should have given you the full picture from the offset
Im thinking that I may have to change my delimiting character
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
you know like if you want to work on a specified field in the password file. you would specify the field your interested in my telling the script that the fields are separated by a colon. now, my problem is that I want to specify a field that is not separated by a colon but by a space or tab... (1 Reply)
Discussion started by: TRUEST
1 Replies
2. Shell Programming and Scripting
I want to add the delimiter in particular positions in one txt file.
My file is :
123450000000000testing
898983920202020testfil
.
.
.
1-5 -- after 5th position add ,
6-10 -- after 10th position add ,
11-7 -- like wise..
Expecting output is:
12345,0000000000,testing... (5 Replies)
Discussion started by: Jairaj
5 Replies
3. Shell Programming and Scripting
I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies
4. Shell Programming and Scripting
Hi,
I have a file below
I want to attach an end delimeter '{}' after the time stamp
input file
22113350444356|Status:Assigned,Notes:
APP PRD |Sep 28 2011 12:12:55:660PM
22113350398356|Status:Assigned,Notes:
APP PRD |Sep 28 2011 12:12:55:660AM
22113350621356|Status:Assigned,Notes:... (6 Replies)
Discussion started by: ratheeshjulk
6 Replies
5. Shell Programming and Scripting
hi
if comma delimeter missing in columns treat them as bad file and if it is not then gudfiles. only checking columns not data.
id,name,sal,deptno =======> gudfile
1,awa,200,10
2,aba,100,20
3,cdc,300,30
idname,sal,deptno ========> badfile since its missing (.)... (8 Replies)
Discussion started by: awais290
8 Replies
6. Shell Programming and Scripting
Hi Friends,
I have a file1.txt as below
29123973Ç2012-0529Ç35310124Ç000000000004762Ç00010Ç20Ç390ÇÇÇÇF
29123974Ç20120529Ç35310125Ç0000000000046770Ç00010Ç20Ç390ÇÇÇÇF
29123975Ç20120529Ç35310126Ç0000000000046804Ç00010Ç20Ç390ÇÇÇÇF
29123976Ç20120529Ç35310127Ç0000000000044820Ç00010Ç20Ç390ÇÇÇÇF
i have a file2.txt... (4 Replies)
Discussion started by: i150371485
4 Replies
7. Shell Programming and Scripting
Hi Friends,
I have a file as below
source.txt
12345JackYKing32N
1235 JulyYoig 31N
i am using cut command for cutting the fields
cut -c 1-5 source.txt
12345
1235
like above i have to use each time to cut all the fieds manually. I have a file(pre.txt) which tells... (3 Replies)
Discussion started by: i150371485
3 Replies
8. Shell Programming and Scripting
Hi All,
I have an awk command that uses the substr function - At the moment I know the length of the values so can use the example below i.e substr(i,0,1)
However in future these lengths may change so wondered if you can use a delimiter within a substr? Like in bash you could use cut -d ';',... (6 Replies)
Discussion started by: Ads89
6 Replies
9. Shell Programming and Scripting
Hi,
Need help on replacing every second instance of delimeter.
Scenario:
var="Name1,Value1,Name2,Value2,Name3,Value3,Name4,Value"
I want every second "," to replace with "|"
I tried like below
echo $var| sed 's/,/|/2'
But, it's not working.
Expected output:
... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
10. Shell Programming and Scripting
Hi Team
below test file contains tab delimeter file and i am excepting the number of files 3.
File : test.txt
a b c
awk -vFPAT='\t' -vOFS="\t" -v a="0" -v b="10" ' NR>a {if (NF != b ) print NR"@"NF }' test.txt
current output is
1@2
required output is
1@3
Cloud you please help... (7 Replies)
Discussion started by: bmk123
7 Replies
LEARN ABOUT OPENSOLARIS
address
Address(3pm) User Contributed Perl Documentation Address(3pm)
NAME
Palm::Address - Handler for Palm AddressBook databases
SYNOPSIS
use Palm::Address;
DESCRIPTION
The Address PDB handler is a helper class for the Palm::PDB package. It parses AddressBook databases.
AppInfo block
The AppInfo block begins with standard category support. See Palm::StdAppInfo for details.
Other fields include:
$pdb->{appinfo}{lastUniqueID}
$pdb->{appinfo}{dirtyFields}
I don't know what these are.
$pdb->{appinfo}{fieldLabels}{name}
$pdb->{appinfo}{fieldLabels}{firstName}
$pdb->{appinfo}{fieldLabels}{company}
$pdb->{appinfo}{fieldLabels}{phone1}
$pdb->{appinfo}{fieldLabels}{phone2}
$pdb->{appinfo}{fieldLabels}{phone3}
$pdb->{appinfo}{fieldLabels}{phone4}
$pdb->{appinfo}{fieldLabels}{phone5}
$pdb->{appinfo}{fieldLabels}{phone6}
$pdb->{appinfo}{fieldLabels}{phone7}
$pdb->{appinfo}{fieldLabels}{phone8}
$pdb->{appinfo}{fieldLabels}{address}
$pdb->{appinfo}{fieldLabels}{city}
$pdb->{appinfo}{fieldLabels}{state}
$pdb->{appinfo}{fieldLabels}{zipCode}
$pdb->{appinfo}{fieldLabels}{country}
$pdb->{appinfo}{fieldLabels}{title}
$pdb->{appinfo}{fieldLabels}{custom1}
$pdb->{appinfo}{fieldLabels}{custom2}
$pdb->{appinfo}{fieldLabels}{custom3}
$pdb->{appinfo}{fieldLabels}{custom4}
$pdb->{appinfo}{fieldLabels}{note}
These are the names of the various fields in the address record.
$pdb->{appinfo}{country}
An integer: the code for the country for which these labels were designed. The country name is available as
$Palm::Address::countries[$pdb->{appinfo}{country}];
$pdb->{appinfo}{misc}
An integer. The least-significant bit is a flag that indicates whether the database should be sorted by company. The other bits are
reserved.
Sort block
$pdb->{sort}
This is a scalar, the raw data of the sort block.
Records
$record = $pdb->{records}[N];
$record->{fields}{name}
$record->{fields}{firstName}
$record->{fields}{company}
$record->{fields}{phone1}
$record->{fields}{phone2}
$record->{fields}{phone3}
$record->{fields}{phone4}
$record->{fields}{phone5}
$record->{fields}{address}
$record->{fields}{city}
$record->{fields}{state}
$record->{fields}{zipCode}
$record->{fields}{country}
$record->{fields}{title}
$record->{fields}{custom1}
$record->{fields}{custom2}
$record->{fields}{custom3}
$record->{fields}{custom4}
$record->{fields}{note}
These are scalars, the values of the various address book fields.
$record->{phoneLabel}{phone1}
$record->{phoneLabel}{phone2}
$record->{phoneLabel}{phone3}
$record->{phoneLabel}{phone4}
$record->{phoneLabel}{phone5}
Most fields in an AddressBook record are straightforward: the "name" field always gives the person's last name.
The "phoneN" fields, on the other hand, can mean different things in different records. There are five such fields in each record, each of
which can take on one of eight different values: "Work", "Home", "Fax", "Other", "E-mail", "Main", "Pager" and "Mobile".
The $record->{phoneLabel}{phone*} fields are integers. Each one is an index into @Palm::Address::phoneLabels, and indicates which
particular type of phone number each of the $record->{phone*} fields represents.
$record->{phoneLabel}{display}
Like the phone* fields above, this is an index into @Palm::Address::phoneLabels. It indicates which of the phone* fields to display in the
list view.
$record->{phoneLabel}{reserved}
I don't know what this is.
METHODS
new
$pdb = new Palm::Address;
Create a new PDB, initialized with the various Palm::Address fields and an empty record list.
Use this method if you're creating an Address PDB from scratch.
new_Record
$record = $pdb->new_Record;
Creates a new Address record, with blank values for all of the fields. The AppInfo block will contain only an "Unfiled" category, with ID
0.
"new_Record" does not add the new record to $pdb. For that, you want "$pdb->append_Record".
SOURCE CONTROL
The source is in Github:
http://github.com/briandfoy/p5-Palm/tree/master
AUTHOR
Alessandro Zummo, "<a.zummo@towertech.it>"
Currently maintained by brian d foy, "<bdfoy@cpan.org>"
SEE ALSO
Palm::PDB(3)
Palm::StdAppInfo(3)
BUGS
The new() method initializes the AppInfo block with English labels and "United States" as the country.
perl v5.10.1 2010-02-23 Address(3pm)