Sponsored Content
Full Discussion: Column Alignment
Top Forums UNIX for Dummies Questions & Answers Column Alignment Post 302099005 by clemeot on Thursday 7th of December 2006 09:20:46 PM
Old 12-07-2006
hi,

when i pipe the col -b, it looks like nothing different. could u provide a simple example?

file content:
FIELD COUNT
------ -------
ABC 123
ABC_1 133
ABC_4 30

cat {filename} |grep ABC |col -b

output:
ABC 123
ABC_1 133
ABC_4 30
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ls command alignment problem

With older Linux servers, the command: ls -al would output text that would have the filenames all lined up in the same column (the owner and group names were truncated to produce a uniform right column). In newer distros (i.e. RHEL 3), the command will push the right column out when owners... (0 Replies)
Discussion started by: robf
0 Replies

2. Programming

Array alignment on HPUX

Hi, I'm porting code from Windows to HP-UX 11.23, using gcc (I'm begining to suspect this might not be the best choice, but I thought it would be most compatible since we've already compiled on Linux with gcc). I have in my code something similar to the folowing: unsigned char *ch_arr =... (4 Replies)
Discussion started by: rimon
4 Replies

3. Shell Programming and Scripting

alignment of variable

Dear Champs, i have a file let a.txt having value number text 00 123 012 145 456 ...etc i need number and text column vales should right align ??? how can i achive this ??? NOTE number is of max 3 char and text can take max 7 char...so if any records are less than above lengths... (2 Replies)
Discussion started by: manas_ranjan
2 Replies

4. UNIX for Dummies Questions & Answers

VI paste out of alignment

We have a guy at work who is trying to copy and paste from one file to another using vi and highlighting the code to copy with a mouse. Source file: xyz 123 abc 999 zyx 321 cba 999 xyz 123 abc 999 But when he pastes it he gets (I put the underlines in to show... (4 Replies)
Discussion started by: dlam
4 Replies

5. Shell Programming and Scripting

Text Alignment Problem

Dear Friends, I've one file "sample.log" with the below comma separated lines: BOND_FORWARD,0 succeeded,0 failed. EQUITY_FORWARD,0 succeeded,0 failed. FRA,12 succeeded,0 failed. OPTION_BAR,16 succeeded,0 failed. OPTION_VAN,76 succeeded,0 failed. RENTOPT_CAP_FLOOR,4775 succeeded,0 failed.... (2 Replies)
Discussion started by: ganapati
2 Replies

6. Shell Programming and Scripting

alignment

Hi, I am having a file with with format. however, for longer xml, the xml code has been truncated like this. F1 |###################### |String1 |<XML><REQ><MSGTYPE>DBDIRECT</MSGTYPE><SYNC>0</SYNC><CLIENT>C11</CLIENT>NAME=MYNAME|JOB=MYJOB| | ... (3 Replies)
Discussion started by: shellwell
3 Replies

7. HP-UX

HP-UX text alignment

HI all, I tried to edit my files using HP-UX but my output tends to not align when I add another character in the files to edit my files i used the command is as follow chmod +w filename vi filename Help, :eek: (1 Reply)
Discussion started by: jasonhpwong
1 Replies

8. Shell Programming and Scripting

Row alignment

*1 flash read test(*do_test1*) PASS *2 xxxxxxxxxxx flash write test(*do_test2) FAIL ------>xxxxx *1 flash read test(*do_test1*) PASS *2 xxxxxxxxxxx flash write test(*do_test2) FAIL ------>xxxxx I want pass and Fail to be aligned if each line uses printf or echo to print, is... (5 Replies)
Discussion started by: yanglei_fage
5 Replies

9. UNIX for Beginners Questions & Answers

Help with awk alignment

Dear All, I am in the beginning stage of learning shell scripting and preparing shell script on my own now. I would like to get help from fellow mates here. As I am trying to take O/P with space included from I/P table. Kindly guide me to align given I/P table as Expected O/P. ... (5 Replies)
Discussion started by: Raja007
5 Replies
CUBRID_NUM_FIELDS(3)							 1						      CUBRID_NUM_FIELDS(3)

cubrid_num_fields - Return the number of columns in the result set

SYNOPSIS
int cubrid_num_fields (resource $result) DESCRIPTION
This function returns the number of columns in the result set, on success, or it returns FALSE on failure. PARAMETERS
o $result -$result comes from a call to cubrid_execute(3), cubrid_query(3) and cubrid_prepare(3) RETURN VALUES
Number of columns, on success. -1 if SQL sentence is not SELECT. FALSE when process is unsuccessful. EXAMPLES
Example #1 cubrid_num_fields(3) example <?php $conn = cubrid_connect("localhost", 33000, "demodb"); $req = cubrid_execute($conn, "SELECT * FROM code"); $row_num = cubrid_num_rows($req); $col_num = cubrid_num_fields($req); printf("Row Num: %d Column Num: %d ", $row_num, $col_num); cubrid_disconnect($conn); ?> The above example will output: Row Num: 6 Column Num: 2 PHP Documentation Group CUBRID_NUM_FIELDS(3)
All times are GMT -4. The time now is 11:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy