Sponsored Content
Full Discussion: awk new line rightmost
Top Forums Shell Programming and Scripting awk new line rightmost Post 302990090 by Don Cragun on Saturday 21st of January 2017 05:46:59 PM
Old 01-21-2017
By giving us a DOS format notepad instead of a UNIX text file are you saying that your input is a DOS format file and you want DOS format output (CR/NL as line separators with no terminator at the end of the last line instead of UNIX text files with NL as line terminators)?

You still have not given us any description at all of what input you are reading to produce either of the output files you have shown us (you have shown us actual output and expected output, but no input). How do you expect us to be able to help you transform the input you will be reading to produce the output you want if we have to guess at what the input might be???

From the 2nd header line of your actual output (which does not appear in your expected output), are we to assume that all fields are fixed width and that the ACL output that you are trying to produce and align is to appear starting in column 91 (even though none of your actual or expected output is aligned that way)?

Please help us help you! Give us:
  1. a clear English description of the format of the input you will be processing,
  2. a clear English description of the format of the output you hope to produce,
  3. a sample input file in that format, and
  4. a sample output file showing the exact output that should be produced when processing that sample input file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk not working due to missing new line character at last line of file

Hi, My awk program is failing. I figured out using command od -c filename that the last line of the file doesnt end with a new line character. Mine is an automated process because of this data is missing. How do i handle this? I want to append new line character at the end of last... (2 Replies)
Discussion started by: pinnacle
2 Replies

2. Shell Programming and Scripting

reading a file inside awk and processing line by line

Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt. and i am stuck. list=`cat /u/Test/programs`; psg "ServTest" | awk -v listawk=$list '{ cmd_name=($5 ~ /^/)? $9:$8 for(pgmname in listawk) ... (6 Replies)
Discussion started by: Anteus
6 Replies

3. Shell Programming and Scripting

awk script to move a line after the matched pattern line

I have the following text format in a file which lists the question first and then 5 choices after that the explanantion and finally the answer. 1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become obsolete has been declining because of the... (2 Replies)
Discussion started by: nanchil_guy
2 Replies

4. Shell Programming and Scripting

How to calculate mean in AWK? line by line several files, thousands of lines

I'm kinda stuck on this one, I have 7 files with 30.000 lines/file like this 050 0.023 0.504336 050 0.024 0.529521 050 0.025 0.538908 050 0.026 0.537035 I want to find the mean line by line of the third column from the files named like this: Stat-f-1.dat .... Stat-f-7.dat Stat-s-1.dat... (8 Replies)
Discussion started by: AriasFco
8 Replies

5. Shell Programming and Scripting

Counting rows line by line from a specific column using Awk

Dear UNIX community, I would like to to count characters from a specific row and have them displayed line-by-line. I have a file called testAwk2.csv which contain the following data: rabbit penguin goat giraffe emu ostrich I would like to count in the middle row individually... (4 Replies)
Discussion started by: vnayak
4 Replies

6. Shell Programming and Scripting

increment counter as suffix starting with the rightmost digit

Hi, I would like to add a suffix to a file name but maintain the suffix length to 5 digits. For eg, output > 1st_file.00001, 2nd_file.00002...10th_file.00010....100th_file.00100 Can anyone please advise me on how to go about it? Platform: SunOS mps201a 5.9 Generic_118558-39 sun4u... (7 Replies)
Discussion started by: danish0909
7 Replies

7. Shell Programming and Scripting

How to read a two files, line by line in UNIX script and how to assign shell variable to awk ..?

Input are file and file1 file contains store.bal product.bal category.bal admin.bal file1 contains flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0 store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies

8. Shell Programming and Scripting

Multiple line search, replace second line, using awk or sed

All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed... I have an input file similar to: &LOG &LOG Part: "@DB/TC10000021855/--F" &LOG &LOG &LOG Part: "@DB/TC10000021852/--F" &LOG Cloning_Action: RETAIN &LOG Part: "@DB/TCCP000010713/--A" &LOG &LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies

9. Shell Programming and Scripting

Honey, I broke awk! (duplicate line removal in 30M line 3.7GB csv file)

I have a script that builds a database ~30 million lines, ~3.7 GB .cvs file. After multiple optimzations It takes about 62 min to bring in and parse all the files and used to take 10 min to remove duplicates until I was requested to add another column. I am using the highly optimized awk code: awk... (34 Replies)
Discussion started by: Michael Stora
34 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
cueconvert(1)						      General Commands Manual						     cueconvert(1)

NAME
cueconvert - convert files between CUE and TOC formats SYNOPSIS
cueconvert [ -i format | --input-format=format ] [ -o format | --output-format=format ] [ infile [ outfile ] ] cueconvert --help DESCRIPTION
cueconvert coverts files between the CUE and TOC formats, each of which are commonly used by compact disc ripping software to denote track breakpoints and other data. The operands are optional; if infile is not specified, cueconvert reads from standard input, and if outfile is not specified, it writes to standard output. If no filenamess are specified, standard input is used, and an input format option must be specified. The complementary format is used for output. If filenames are provided, but format options are not specified, the input and output formats will be guessed based on each filename's suf- fix (e.g., .cue or .toc). This heuristic is case-insensitive. OPTIONS
-h, --help displays a usage message and exits. -i format, --input-format=format sets the expected format of the input file to format. -o format, --output-format=format sets the format of the generated output file to format. The option argument format must be either cue or toc. EXIT STATUS
cueconvert exits with status zero if it successfully coverts the input file, and nonzero if there were problems. AUTHOR
Cuetools was written by Svend Sorensen. Branden Robinson contributed fixes and enhancements to the utilities and documentation. SEE ALSO
cuebreakpoints(1), cueprint(1) cueconvert(1)
All times are GMT -4. The time now is 01:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy