I have one request, First it has to create one file and in that file
it has to include some lines based on user request.
Suppose user requested 10, then script needs to add 10 lines like below
QAEVO_A1|A1
QAEVO_A2|A2
QAEVO_A3|A3
QAEVO_A4|A4
QAEVO_A5|A5
QAEVO_A6|A6
QAEVO_A7|A7... (8 Replies)
Hello,
I need to modify an awk script to recognize the last field $NF when the line is split over more than 1 line.
In my input file the field separator is the exclamation mark ! so FS="!"
So here is my input file infile.txt, it has 2 records, the field separator is in bold:
INPUT
... (6 Replies)
Greetings!
Some of my files list hardware errors (we test electronic components), some have none. If the file name has no errors, I still want to display a message like "No error", else I display the error from the file itself.
I came up with this (with help)
for myfile in `find . -name... (2 Replies)
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)
Hello,
I have a requirement to ignore few lines in a file before keyword FILEHEADER . As soon as there is keyword FILEHEADER is identified in file , it will form another file with data from FILEHEADER to whatever in file after FILEHEADER.
I wrote
filename=$1
awk... (4 Replies)
Please Help (novice to PERL and SHELL scripting)…. Need to create a script which removes all lines in $filename = "cycle_calendar_ftp_out" older than current date – a variable which will be a number of days passed to script. For Ex it will look at the end date which is the last field (4) and... (2 Replies)
I want to create a file contains millions of lines. The line format like this:
acnum$$123456$$+$$Tom$$111$$
fields separated by $$, field 1 and field 3 have only two options:acnum or crenum; + or -. field 4 can be any name or any letters. Other fields can be any fixed length digits. So, I want to... (9 Replies)
Hello Members,
I have one file which contains million of supplier code. I need to load these codes into database 1000 at a time.
Database procedure reads from an external table which is based on the unix files.
All I want to do is to read from the bigger file e.g. MAIN_FILE.txt and create... (1 Reply)
Two numerical lines, found by either header line, need to be added
and the total placed in a new-header section. Also the total should
should be rounded or cut to a two decimal anynumber.XX format
with the AB string added on the end.
For example: The numerical lines from headers 2 and 3 are... (3 Replies)
File 1 contains the list of words that needed to be randomly paired:
Tiger
Cat
Fish
Frog
Dog
Mouse
Elephant
Monkey
File 2 contains the pairs that should not be used (in any solution) during random pairing.
Elephant-Dog
Cat-Fish
Monkey-Frog
Dog-Elephant, Fish-Cat, Frog-Monkey... (1 Reply)
Discussion started by: sammy777888
1 Replies
LEARN ABOUT HPUX
fmt
fmt(1) General Commands Manual fmt(1)NAME
fmt - format text
SYNOPSIS
width] [file...]
DESCRIPTION
The command is a simple text formatter that fills and joins lines to produce output lines of (up to) the number of characters specified in
the width option. The default width is 72. concatenates the arguments. If none are given, formats text from the standard input.
Blank lines are preserved in the output, as is the spacing between words. does not fill lines beginning with a period for compatibility
with Nor does it fill lines starting with
Indentation is preserved in the output and input lines with differing indentation are not joined (unless is used).
can also be used as an in-line text filter for the command:
reformats the text between the cursor location and the end of the paragraph.
Options
recognizes the following options:
Crown margin mode.
Preserve the indentation of the first two lines within a paragraph and align the left margin of each subsequent line with that
of the second line. This is useful for tagged paragraphs.
Split lines only.
Do not join short lines to form longer ones. This prevents sample lines of code, and other such "formatted" text, from being
unduly combined.
Fill output lines to up to
width columns.
WARNINGS
The width option is acceptable for BSD compatibility, but it may go away in future releases.
SEE ALSO nroff(1), vi(1).
fmt(1)