05-07-2016
If you provide a clear description of your problem (instead of just one sample of a problem with no description), you will be more likely to get a response.
What are the line delimiters in your input file? UNIX single newline character delimiters or DOS carriage-return/newline character pair delimiters? Are the delimiters on split lines the same as in a correctly formatted line? Or, is the delimiter on split lines different from the delimiter on correctly formatted lines? What delimiters do you need in your output file?
How are we supposed to know when a line is complete?
Is your verification program supposed to know that there should be a specific number of fields in each input line? Is that number of fields the same for every file your verification program will process?
Is an invalid input line ALWAYS split between a pair of double quotes? Can we assume that a line needs to be combined with the next line from the input file if and only if an input line does not end with a double quote character?
Are invalid records always split by converting a space to a newline? How do we know whether or not a character needs to be added when lines are joined? Is a space character ALWAYS supposed to be added when lines are joined?
What operating system and shell are you using?
What have you tried to solve this problem on your own?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I want to delete duplicate records from a tilde delimited file. Criteria is considering the first 2 fields, the combination of which has to be unique, below is a sample of records in the input file
1620000010338~2446694087~0~20061130220000~A00BCC1CT... (5 Replies)
Discussion started by: irshadm
5 Replies
2. UNIX for Dummies Questions & Answers
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)
Discussion started by: jclanc8
3 Replies
3. Shell Programming and Scripting
this is Korn shell unix.
The scenario is I have a pipe delimited text file which needs to be customized. say for example,I have a pipe delimited text file with 15 columns(| delimited) and 200 rows. currently the 11th and 12th column has null values for all the records(there are other null columns... (4 Replies)
Discussion started by: vasan2815
4 Replies
4. Shell Programming and Scripting
Hi,
I have a comma (,) delimited file, in which few fields are enclosed with in double quotes " ". I have to print the records in the file which donot have expected number of field with the line number.
File1
====
name,desgnation,doj,project #header#... (7 Replies)
Discussion started by: machomaddy
7 Replies
5. Shell Programming and Scripting
Hi
I have a text file called 'fileA' which contains the follwoing line examples
01:rec1:25,50,75,100
02:rec2:30,60
03:rec3:20,40
I would like to create a new file where each of the comma separated values appears on a new line but prefixed with the first two fields e.g.
01:rec1:25... (3 Replies)
Discussion started by: mackmb
3 Replies
6. UNIX for Dummies Questions & Answers
I'm trying to remove all of the empty lines at the end of a Tab delimited file. They have no data just tabs.
I've tried may things, here are a couple:
sed /^\t.\t/d File1 > File2
sed /^\t{44}/d File1 > File2
What am I missing? (9 Replies)
Discussion started by: SirHenry1
9 Replies
7. UNIX for Advanced & Expert Users
actually i post about this issue before but many folkz miss-understood with my quesion,
We are checking for the delimited file records validation
Delimited file will have data like this:
Aaaa|sdfhxfgh|sdgjhxfgjh|sdgjsdg|sgdjsg|
Aaaa|sdfhxfgh|sdgjhxfgjh|sdgjsdg|sgdjsg|... (3 Replies)
Discussion started by: Seshendranath
3 Replies
8. Shell Programming and Scripting
Hello to all,
I have an hexdump -C format as below:
31 54 47 55 48 4c 52 31 5f 52 31 32 31 31 32 ff
44 00 00 0E 01 32 14 56 42 17 47 48 0f ff ff ff
44 00 00 01 32 14 56 00 23 83 95 2f 42 17 47 48
00 0f ff ff 00 15 00 0a 48 00 01 5a 00 02 17 00
00 2f 00 00 30 00 00 31 00 00 ff 34 ff 44 00... (23 Replies)
Discussion started by: Ophiuchus
23 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am not sure if I've posted this question before.
Anyway, I previously asked about converting lines of text into a comma delimited string. Now I am needing to do the other way around ... :( :o
Can anyone advise how is this possible?
Example as below:
Converting records/lines to... (2 Replies)
Discussion started by: newbie_01
2 Replies
10. UNIX for Beginners Questions & Answers
Hi,
Apologies in advance to the moderator if I am posting this the wrong way.
I've searched and found the solution to an old post but as it is a very old post, I don't see an option to update it with additional question.
The question I have is in relation to the following post:
How to... (6 Replies)
Discussion started by: newbie_01
6 Replies
LEARN ABOUT HPUX
acctcon1
acctcon(1M) acctcon(1M)
NAME
acctcon, acctcon1, acctcon2 - connect-time accounting
SYNOPSIS
[options]
[options]
DESCRIPTION
The command converts a sequence of login/logoff records read from its standard input to a sequence of records, one per login session. Its
input should normally be redirected from or Its output is ASCII, giving device, user ID, login name, prime connect time (seconds), non-
prime connect time (seconds), session starting time (numeric), and starting date and time. Prime connect time is defined as the connect
time within a specific prime period on a non-holiday weekday (Monday through Friday). The starting and ending time of the prime period and
the year's holidays are defined in file
expects as input a sequence of login session records, produced by and converts them into total accounting records (see format in acct(4)).
combines the functionality of and into one program. It takes the same input format as and writes the same output as
recognizes the following options:
Print input only, showing line name, login name,
and time (in both numeric and date/time formats).
maintains a list of lines on which users are logged in.
When it reaches the end of its input, it emits a session record for each line that still appears to be active. It
normally assumes that its input is a current file, so that it uses the current time as the ending time for each ses-
sion still in progress. The flag causes it to use, instead, the last time found in its input, thus ensuring reason-
able and repeatable numbers for non-current files.
and recognize the following options:
file is created to contain a summary of line usage showing line name, number of minutes used, percentage of total elapsed
time used, number of sessions charged, number of logins, and number of logoffs. This file helps track line usage,
identify bad lines, and find software and hardware oddities. Hang-up, termination of (see login(1)), and termination
of the login shell each generate logoff records, so that the number of logoffs is often three to four times the num-
ber of sessions. See init(1M) and utmp(4).
file is filled with an overall record for the accounting period, giving starting time, ending time, number of reboots, and
number of date changes.
When this option is used, the records of the type found in
are read from the specified input.
EXAMPLES
These commands are typically used as shown below. The file is created only for the use of commands described by the acctprc(1M) manual
entry:
or
With option:
or
Note:
The file can be either or a file containing records of the type found in
WARNINGS
The line usage report is confused by date changes. Use (see fwtmp(1M)) to correct this situation.
FILES
SEE ALSO
login(1), acct(1M), acctcms(1M), acctcom(1M), acctmerg(1M), acctprc(1M), acctsh(1M), fwtmp(1M), init(1M), utmpd(1M), runacct(1M), acct(2),
getbwent(3C), acct(4), utmp(4).
STANDARDS CONFORMANCE
acctcon(1M)