02-01-2008
Thank you
Hi
Thanks!!. That was very quick and it works 95% correct. Only exception here is it create a record in every instance.., i.e. even if SC1 or SC2 or DC1 or DC2 is blank.
I mean we tested this script in all the possibalities, of SC1,SC2,SC3 and SC4, i.e. with all the 16 possibalities and it created total 64 records, where as it should have created only 32. Hence we need to eliminate the other 32 records.
Could you advice on this.
Once again thank you very much for your swift and accurate reply.
Thanks
Uday
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
i have a report.csv file from oracle datavase
In that file data is like this with report heading and date
SALES DAILY REPORT
DATE: 06-26-2007
REPORT NAME: SALES DATA
AA.BB.CCCC.DDDD,BBBBB,06-26-2007,0,BEGIN,END
ZZ.VV.DDDD.XXXXXXX,MMMMMM,06-25-2007,18,BEGIN,END... (3 Replies)
Discussion started by: raosurya
3 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I have written a shell script to search a specified directory (e.g. /home/user) for a list of specific words (shown as ${TMPDIR}/wordlist below). The script works well enough, but I was wondering if there was a way to display the line number that the word is found on?
Thanks!
cat... (1 Reply)
Discussion started by: tmcmurtr
1 Replies
3. Shell Programming and Scripting
Friends...This is the first time i am trying the report generation using shell script... any suggestions are welcome.
Is there a way to set the font size & color when i am exporting the data from unix shell script as a CSV file ?
The following sample data is saved as a .csv file in the... (2 Replies)
Discussion started by: appu2176
2 Replies
4. Shell Programming and Scripting
Hello,
I am working on building a script that does the below actions together in my Linux server.
1) First, have to read the list of strings mentioned in CSV and store it in the shell script
2) Second, pick one by one from the string list, and search a particular folder for files that... (2 Replies)
Discussion started by: vikrams
2 Replies
5. Shell Programming and Scripting
Need perl or shell script to sort vertical lines to horizontal line in csv format
My file like below
-------------------------
================================================================================
PATH PINKY1000#I1-1-ZENTA1000-2#I7-1-ASON-SBR-UP-943113845 ... (4 Replies)
Discussion started by: sreedhargouda.h
4 Replies
6. Shell Programming and Scripting
I have a shell script which creates a CSV files. there are 3 fields, field1, field2 and comp. I will generates the values for field1 and field2 and Want to compare both. If field1>filed2 then comp should be success written in green in CSV file, else it should fail in red color. How can I change the... (5 Replies)
Discussion started by: sauravrout
5 Replies
7. UNIX for Dummies Questions & Answers
Hi Guys,
I am new to shell script.I need your help to write a shell script.
I need to write a shell script to extract data from a .csv file where columns are ',' separated.
The file has 7 columns having values say column 1,column 2.....column 7 as below along with their values.
Name, Address,... (7 Replies)
Discussion started by: Vivekit82
7 Replies
8. Shell Programming and Scripting
Hi everyone,
I have a csv file which has data with different heading and column names as below.
Static Data Ingested
,,,,,,,,,,,,Known Explained Rejections
Column_1,column_2,Column_3,Column_4,,Column_6,Column_7,,% Column_8,,Column_9 ,Column_10 ,... (14 Replies)
Discussion started by: Vivekit82
14 Replies
9. Programming
Hi Experts,
I am writing a python script to grep string from file and display output in csv file as in attached screenshot
https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view
Input file(result_EPFT_config_device)
Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
LEARN ABOUT HPUX
acctcon2
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)