03-16-2006
Delimeter used in data
Blasted data inputters
they always have to screw my data up....My comma delimited file with three fields ( firstname,surname and address ) has been screwed up by people entering addresses like this (putting a comma in between the house number and the street name)
142,Stonewall Avenue
We explicitly instructed them not to do this and yet you always get one dont you
So my three field comma delimited file is now a four field one on some lines
eg
Gary,Jones,12 Example Street
Peter,Wilson,15,Demo Street
Im not sure theres any way to rectify this ? , maybe theres something you all could suggest.....any help would be greatly appreciated
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 HPUX
newalias
newalias(1) General Commands Manual newalias(1)
NAME
newalias - install new elm aliases for user or system
SYNOPSIS
Remarks
replaces the former functionality of the command.
DESCRIPTION
The command creates new alias database files from an alias text file for use by and other programs. For user aliases, this functionality
can also be performed from the Alias Menu of the program (see elm(1)).
Options
recognizes the following option:
Global.
The program updates the system alias files instead of a user's alias files.
Operation
Without the option, updates a user's alias files, based on an input file named
Upon finding the file, it creates the output files named
With the option, updates the system alias files, based on an input file named
Upon finding the file, it creates the output files named
In either case, you need read access to the file and write access to the other files and the directory.
Text File Entries
Each entry in either file is expected to be in the following format:
The field names are defined as follows:
address-list A blank- or comma-separated list of one or more mail addresses, personal alias names, and/or group alias names.
In practice, each item is tested first as an alias name. If it is not an alias name, it is assumed to be a mail
address. A mail address can be in Internet form in UUCP form or in alias form (see sendmail(1M)). It can also be
the name of a local mail user, which is appended with the local host name in Internet form.
alias-list A blank- or comma-separated list of alias names. Each name identifies the same alias entry. An alias name can be
made up of letters digits underscores dashes and periods Alias names are not case-sensitive, so and are equivalent.
comment A string containing any information you wish about the entry, such as location and phone numbers. It is displayed in
the Alias Menu of the program, but does not transmit it in a mail message. This field can contain any characters
except an unquoted equal sign See the Quoting Characters subsection.
firstname The first name of the person (or group). It is combined with lastname to form the fullname. This field can contain
any characters except an unquoted equal sign or an unquoted comma See the Quoting Characters subsection.
The only first name under the Personal or Group Aliases subheading below is: in
lastname The last name of the person (or group). It is combined with firstname to form the fullname. This field can contain
any characters except an unquoted equal sign an unquoted semicolon or an unquoted comma See the Quoting Characters
subsection.
The last names under the Personal or Group Aliases subheading below are: and
fullname The combination of firstname lastname. It is usually sent in a mail header in parentheses after the address. It is
also displayed in the Alias Menu of the program and by the command (see elm(1) and elmalias(1)).
The delimiters have the following precedence:
o The first and second equal signs mark the end of the alias-list and the beginning of the address-list, respectively. Both equal signs
are required.
o The first comma after the first equal sign and before the second equal sign marks the beginning of the comment field.
o The first semicolon after the first equal sign and before the next comma or second equal sign marks the beginning of the firstname
field.
A personal or individual alias has only one address in address-list, as in:
A group alias has two or more addresses in address-list, as in:
Entries can be continued over several lines; the continuation lines must start with a blank (a space or tab).
A comment is any line starting with a number sign It is ignored.
Blank lines and comments can be interspersed within entries.
Quoting Characters
You can include normally excluded characters in firstname, lastname, comment, and mail addresses in address-list by escaping each character
with a backslash or by enclosing the string in quotation marks ("). To include a quotation mark or a backslash, escape it with a back-
slash, whether inside or outside quotation marks.
FILES
User alias database data table
User alias database directory table
User alias database hash table
User alias source text
System alias database data table
System alias database directory table
System alias database hash table
System alias source text
AUTHOR
was developed by HP.
SEE ALSO
elm(1), elmalias(1), mail(1), mailx(1).
newalias(1)