Sponsored Content
Top Forums Shell Programming and Scripting Extracting formatted text and numbers Post 302406251 by DFr0st on Monday 22nd of March 2010 11:42:11 AM
Old 03-22-2010
Yes,
Every record that I want to extract to a new line in the output file starts with a date in the format YYYY.MM.DD. However, not all records that I want have the following lines with aang, a, and b.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert DATE string to a formatted text

Hi guys, i need your help. I need to convert a date like this one 20071003071023 , to a formated date like 20071003 07:10:23 . Could this be possible ? Regards, Osramos (6 Replies)
Discussion started by: osramos
6 Replies

2. Shell Programming and Scripting

Script or command: Formatted text to CSV

Hi Everyone, I've been using this site as a great resource to aid me with simple search and replace tasks. I still consider myself a novice and now I've been pulling my hair out over this problem. Any hints or suggestions would be welcome! I have a text file in a format like this name:... (6 Replies)
Discussion started by: regexnub
6 Replies

3. Shell Programming and Scripting

print formatted text to the printer

Hello!!! I am using shell script that print some formated text on the screen (example) ======== hello I am ... ======== Is it possible to print this information to the printer exactly as I see it on the screen??? (6 Replies)
Discussion started by: tdev457
6 Replies

4. UNIX for Dummies Questions & Answers

Print numbers and associated text belonging to an interval of numbers

##### (0 Replies)
Discussion started by: lucasvs
0 Replies

5. UNIX for Dummies Questions & Answers

Extracting lines from a text file based on another text file with line numbers

Hi, I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

6. Shell Programming and Scripting

Extracting lines from text files in folder based on the numbers in another file

Hello, I have a file ff.txt that looks as follows *ABNA.txt 356 24 36 112 *AC24.txt 457 458 321 2 ABNA.txt and AC24.txt are the files in the folder named foo1. Based on the numbers in the ff.txt file, I want to extract the lines from the corresponding files in the foo1 folder and... (2 Replies)
Discussion started by: mohamad
2 Replies

7. Shell Programming and Scripting

Extracting numbers

Hi I am part of a academic organization and I want to send a fax to the students however there must be a quicker way to get the fax numbers extracted from the online forms they sent me. The file looks like this (numbers are fake in order to protect identity): Biochemistry Major Michael... (3 Replies)
Discussion started by: phil_heath
3 Replies

8. Shell Programming and Scripting

Split files with formatted numbers

How to split the file and have suffix with formatted numbers Tried the following code awk '{filename="split."int((NR-1)/2)".txt"; print >> filename}' split.txt Current Result Expected Result (21 Replies)
Discussion started by: bobbygsk
21 Replies

9. Shell Programming and Scripting

Extracting values based on line-column numbers from multiple text files

Dear All, I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional). I have multiple tab-delimited files with the following structure: file1: 1 44 2 ... (5 Replies)
Discussion started by: Bastami
5 Replies

10. Shell Programming and Scripting

Sum up formatted numbers with comma separation

I need to sum up the values in field nr 5 in a data file that contains some file listing. The 5th field denotes the size of each file and following are some sample values. 1,775,947,633 4,738 7,300 16,610 15,279 0 0 I tried the following code in a shell script. awk '{sum+=$5} END{print... (4 Replies)
Discussion started by: krishmaths
4 Replies
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)
All times are GMT -4. The time now is 02:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy