06-14-2012
Hi All,
Thanks for your response and help.
I've tried the method given by Agama, but the output is still does not give the proper alignment. Sorry.
I guess it might be a better idea to use tab instead.
Also, I was thinking if it's a good idea to insert something like "NA" if column "#AB" and "#CD" is blank (empty). This might helps in the formatting.
Anybody else can help?
Thanks.
- Jack.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am trying to check if if column 5 is greater than 90. If greater it will print the term in column 6, else if all are within limit, then it will output "Size is within limit". I can't seem to do that with the below code. The output should only be 1 statement of "Size is within the... (4 Replies)
Discussion started by: Raynon
4 Replies
2. Shell Programming and Scripting
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Discussion started by: mdap
1 Replies
3. Shell Programming and Scripting
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies
4. Shell Programming and Scripting
Input File:
1234567890123456789012345678901234
----------------------------------
11111 XXX xxxxx 6666666666
22222 YYY 2222222222
33333 AAA TTT xxxxx 9999999999
44444
55555 RRR UUU 5555555555
66666 TTT nnnnn 2222222222
77777 XXX ... (4 Replies)
Discussion started by: lordsmiter
4 Replies
5. Shell Programming and Scripting
INPUT FILE:
9780743565219 "GODS OF NEWPORT" "JAKES, JOHN" 2006
OUTPUT FILE I NEED to CREATE FROM INPUT FILE:
cd /data/audiobooks/9780743565219
~/Desktop/mp3-to-m4b 9780743565219-GODS OF NEWPORT "GODS OF NEWPORT" "JAKES, JOHN" 2006 n ---------- Post updated at 04:19 PM ----------... (6 Replies)
Discussion started by: glev2005
6 Replies
6. Shell Programming and Scripting
Am new to AWk, Can anyone help me to get excepected output from given input please.
input file
student: name
details of them = details_needed
class: 5th_needed
adress: address_needed
Expected output:
details of them = 5th_needed = address_needed
---------- Post updated at... (5 Replies)
Discussion started by: Elavarasan
5 Replies
7. Shell Programming and Scripting
Need some help .. in formating some input
INPUT FILE
IMAGE ap00m43 0 0 8 ap00m43_1318914034 UNIX_STANDARD_ADC_2 0 *NULL* root Daily 1 0 1318914034 408 1319518834 0
HISTO -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
FRAG 1 1 0 0 2 20 6 G11890 ts00p71 65536
FRAG 1 2 13440 0 2 20 7 G11890 ts00p71... (2 Replies)
Discussion started by: greycells
2 Replies
8. Shell Programming and Scripting
Hello
Here is an easy one
Data file
12345 (tab) Some text (tab) 53.432
23456 (tab) Some longer text (tab) 933.422
34567 (tab) Some different text (tab) 29.309
I need to awk these three tab-delimited columns so that the first two are unchanged (unformatted) and the third shows two decimal... (1 Reply)
Discussion started by: palex
1 Replies
9. Shell Programming and Scripting
Hello,
I shall like using the function awk to modify the contents of the following file:
/tmp/conf-1 -sec=sys,rw=lpar1:lpar2:lpar3,access=lpar1:lpar2:lpar3
/tmp/conf-2 -vers=4,sec=sys,rw=lpar4:lpar5:lpar6,access=lpar4:lpar5:lpar6
I need to have the result below towards another file
... (5 Replies)
Discussion started by: khalidou13
5 Replies
10. Shell Programming and Scripting
Guys ,, pls .. need help with this ...
File 1
0A6C Not Visible ???:? NA:NA TDEV N/Grp'd NR 5121
0A6D Not Visible ***:* NA:NA TDEV N/Grp'd RW 33784
0A6E Not Visible ***:* NA:NA TDEV N/Grp'd RW 33784... (4 Replies)
Discussion started by: greycells
4 Replies
LEARN ABOUT DEBIAN
prg2lout
PRG2LOUT(1) General Commands Manual PRG2LOUT(1)
NAME
prg2lout - convert computer program text into Lout
SYNOPSIS
prg2lout -l language [ options ] files...
DESCRIPTION
Reformat computer program text for input to the Lout document formatting system, taking care of comments, character strings, tab charac-
ters, etc.
prg2lout reads the named program source files and produces output suitable for input to lout -s. Thus,
prg2lout -l C foo.c | lout -s | lpr
will print the C program foo.c on a PostScript printer. Each file will start on a new page, preceded by its name in bold.
OPTIONS
-llanguage
(Compulsory.) Files are written in this programmming language. Run prg2lout -u to see the list of languages available.
-pfixed
Use a fixed width font (the default for C).
-pvarying
Use a varying-width italic font with non-italic bold keywords (the default for Eiffel).
-psymbol
Use a varying-width italic font with mathematical symbols and non-italic bold keywords.
-n Do not print the file name before each source file.
-f font
Select a font family. The default is -fCourier for -pfixed, and -fTimes for -pvarying and -psymbol.
-s size
Select a Lout font size. The default is -s9p (meaning 9 points) for -pfixed, and -s10p for -pvarying and -psymbol. These work well
with 80-character-wide programs.
-v vsize
Select a Lout vertical inter-line gap. The default is -v1.1fx meaning 1.1 times the font size measured from baseline to baseline.
-b num Select a blank line scale factor. The default is -b1.0 meaning no scaling. A good alternative is 0.6.
-t num Set the tab interval to num characters (default is -t8).
-T width
Without this option, prg2lout simulates tabs with spaces. With this option, prg2lout simulates tabs with Lout tabulation operators;
width is the width of one tab interval in the final print, measured in Lout units. This guarantees alignment of characters follow-
ing tabs even with varying-width fonts, provided width is sufficiently large. For example, -T0.5i produces half-inch tab intervals.
-L number
Attach line numbers to the program text, beginning with number or 1 if number is not given. You may need to give the 1 anyway to
prevent .I prg2lout from taking a following file name as a number.
-N Do not print line numbers on blank lines.
-M Like -N but do not assign line numbers to blank lines.
-S filename
Use filename as the setup file instead of the system default setup file. The setup file determines the value of all formatting
options not given to prg2lout as command line arguments.
-u Print usage information on stderr, including available languages, and exit.
-V Print version information on stderr and exit.
Raw Mode
There is a "raw mode" usage of prg2lout invoked by a -r flag (must be the first argument). This converts one program file into Lout-read-
able source without any heading or trailing information. Synopsis:
prg2lout -r -i infile -o out -e err -t num -T width
Users should never need this mode; it is invoked automatically from within Lout by symbols supplied with the standard configuration (see
reference).
SEE ALSO
lout(1), lpr(1), ghostview(1).
REFERENCES
Jeffrey H. Kingston, "A User's Guide to the Lout Document Formatting System", Chapter 11.
AUTHOR
Jeffrey H. Kingston
PRG2LOUT(1)