10-08-2005
What is the matter with printf/fprintf? These functions seem to be just what you want.. they have good formatting options - you can have your columns as wide/narrow as you want.
--EDIT--
Another way to do this would be to create your output line in a string first using sprintf (but that is very similar to printf/fprintf), and then use write(2) to write to the standart output.
--EDIT ENDS--
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a short time to solve a problem, so I need some help. I've searched the forum, but I couldn't find a solution to my problem.
I made a script to filter some text and now I have a new requirement to make it available as html table. Problem is that I more than one files with different set... (2 Replies)
Discussion started by: tetreb
2 Replies
2. Programming
Hello,
Could you please let me know the correct format of CREATE TABLE statement with DATE format.
CREATE TABLE EMP_TABLE1 (
NAME VARCHAR(6) PRIMARY KEY,
ADDRESS VARCHAR(6),
BIRTH_DATE DATE
);
I want BIRTH_DATE to be in "YYYYMMDDHHMISS" format.
How we can create table with... (4 Replies)
Discussion started by: Poonamol
4 Replies
3. Shell Programming and Scripting
Hi,
i need a perl script which reads the file, content is given below. and output in new file.
TARGET DRIVE IO1 IO2 IO3 IO4 IO5
------------ --------- --------- --------- --------- ---------
0a.1.8 266 236 ... (3 Replies)
Discussion started by: asak
3 Replies
4. Shell Programming and Scripting
My Code
Hi Friends,
I need to get output in table format using unix shell script.For example my server CPU and memory utilization report will come as a mail with ordinary format but i want to make as table format.
Here two output finally we are getting:-
CPU utilization is... (2 Replies)
Discussion started by: susindram
2 Replies
5. Shell Programming and Scripting
Hi All,
I have a output like below values
val1=test.com
val2=10.26.208.11
val3=en1
val4=test-priv1.com
val5=192.168.3.4
val6=en2
val7=test-priv2.com
val8=192.168.4.4
val9=en3
val10=test-vip.com
val11=10.26.208.9
val12=$val3
I want to convet this output values into below... (1 Reply)
Discussion started by: kamauv234
1 Replies
6. Shell Programming and Scripting
Hi,
I am trying to show my list, from a simple list format to a table (row and column formatted table)
Currently i have this format in my output (the formart it will always be like this ) >> first 3 lines must be on the same line aligned, and the next 3 shud be on 2nd line....:
INT1:... (10 Replies)
Discussion started by: eboye
10 Replies
7. UNIX for Dummies Questions & Answers
Hi,
My apologies if my query is already available on this forum but I am new and could not find.
I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this?
... (4 Replies)
Discussion started by: 8709711
4 Replies
8. Shell Programming and Scripting
I have one script which generate file called report.txt having following output
parameter_name status comment
banking ok NA
finance 30% hike NA
Loan_department ok 20%
HR_Group defaulters Ajay
I wanted to convert this file into tabular form.
You can see each line contain 3 words and... (7 Replies)
Discussion started by: Nakul_sh
7 Replies
9. Shell Programming and Scripting
we are getting files on daily basis.we need to process these files.
i need a unix shell script where we can count
1-The no of files processed
2-No of data/record processed for each files.
The script should log these details into a database table. If there is any error while file... (3 Replies)
Discussion started by: Atul kumar
3 Replies
10. Shell Programming and Scripting
Hello,
In my shell script, I extract table data from HP Vertica DB into a csv file using vsql -c command. But the problem is the file getting created is in binary format and hence some of the data becomes unreadable which has chinese characters as part of data.
file -i filename.csv - gives... (2 Replies)
Discussion started by: Dharmatheja
2 Replies
DISPLAYS(5) File Formats Manual DISPLAYS(5)
NAME
displays - Display Configuration File
DESCRIPTION
The interactive graphics programs Caesar, Magic, and Gremlin use two separate terminals: a text terminal from which commands are issued,
and a color graphics terminal on which graphical output is displayed. These programs use a displays file to associate their text terminal
with its corresponding display device.
The displays file is an ASCII text file with one line for each text terminal/graphics terminal pair. Each line contains 4 items separated
by spaces: the name of the port attached to a text terminal, the name of the port attached to the associated graphics terminal, the phos-
phor type of the graphics terminal's monitor, and the type of graphics terminal.
An applications program may use the phosphor type to select a color map tuned to the monitor's characteristics. Only the std phosphor type
is supported at UC Berkeley.
The graphics terminal type specifies the device driver a program should use when communicating with its graphics terminal. Magic supports
types UCB512, AED1024, and SUN120. Other programs may recognize different display types. See the manual entry for your specific applica-
tion for more information.
A sample displays file is:
/dev/ttyi1 /dev/ttyi0 std UCB512
/dev/ttyj0 /dev/ttyj1 std UCB512
/dev/ttyjf /dev/ttyhf std UCB512
/dev/ttyhb /dev/ttyhc std UCB512
/dev/ttyhc /dev/ttyhb std UCB512 (R)
In this example, /dev/ttyi1 connects to a text terminal. An associated UCB512 graphics terminal with standard phosphor is connected to
/dev/ttyi0.
FILES
Magic uses the displays file ~cad/lib/displays. Gremlin looks in /usr/local/displays.
SEE ALSO
magic(1)
3rd Berkeley Distribution 2/19/85 DISPLAYS(5)