Sponsored Content
Full Discussion: How to pad spaces
Top Forums Shell Programming and Scripting How to pad spaces Post 28912 by Optimus_P on Thursday 26th of September 2002 09:23:13 AM
Old 09-26-2002
you can also use perls format or even printf.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

number pad?

Is there anyway to use the fr*$%& number pad in VI? Anyway? Anyway at all? All it does now random movements and inserts of characters (2 Replies)
Discussion started by: nelsonenzo
2 Replies

2. UNIX for Dummies Questions & Answers

touch pad not working

i just recenlty bought this hp pavillion laptop and installed linux on it.. i found that the touchpad doesn't work.. so i thought that hp pavillion doesn't have touchpad// silly me! // more recently I reinstalled fedora core 2.6.8-1-521 i686 and also xp professional... xp i found has touch pad and... (5 Replies)
Discussion started by: moxxx68
5 Replies

3. Solaris

number pad in vi

Hi, I'm on a sunos SVR4.0 box, my number pad works on the command line but does not work in vi any ideas how to enable it under vi? Thanks (5 Replies)
Discussion started by: c19h28O2
5 Replies

4. UNIX for Dummies Questions & Answers

pad Zeros

Hi can I know command to pad Zeros to a value I get 16 and I need to send 0000000016 (5 Replies)
Discussion started by: mgirinath
5 Replies

5. UNIX for Dummies Questions & Answers

pad

Hi All I need a pad a . to befoure a last digi ex 1258 --> 125.8 help to do thanks (4 Replies)
Discussion started by: nalakaatslt
4 Replies

6. Shell Programming and Scripting

Left pad spaces using awk or sed

Hi,I've a unix pipe delimited file as below f1|f2|f3|f4|f5|f6 My requirement is to pad spaces on the left to fields f2, f3 and f5. Field Lengths according to file layout f2 - 4 char f3 - 5 char f5 - 3 char If my record is as below 1|43|bc|h0|34|a Output record should be as below 1| 43| bc|h0|... (4 Replies)
Discussion started by: Soujanya_K
4 Replies

7. UNIX for Beginners Questions & Answers

Pad 0 to the right

I need to pad 0 to a number on the right. to make it 9 digit in total. My number is 2457 output should be 245700000 Please do wrap your samples/codes into CODE TAGS as per forum rules. (3 Replies)
Discussion started by: varun22486
3 Replies
CUBRID_NEXT_RESULT(3)							 1						     CUBRID_NEXT_RESULT(3)

cubrid_next_result - Get result of next query when executing multiple SQL statements

SYNOPSIS
bool cubrid_next_result (resource $result) DESCRIPTION
The cubrid_next_result(3) function is used to get results of next query if multiple SQL statements are executed and CUBRID_EXEC_QUERY_ALL flag is set upon cubrid_execute(3). PARAMETERS
o $result -$result comes from a call to cubrid_execute(3) RETURN VALUES
TRUE, when process is successful. FALSE, when process is unsuccessful. EXAMPLES
Example #1 cubrid_next_result(3) example <?php $conn = cubrid_connect("127.0.0.1", 33000, "demodb", "dba"); $sql_stmt = "SELECT * FROM code; SELECT * FROM history WHERE host_year=2004 AND event_code=20281"; $res = cubrid_execute($conn, $sql_stmt, CUBRID_EXEC_QUERY_ALL); get_result_info($res); cubrid_next_result($res); get_result_info($res); function get_result_info($req) { printf(" ------------ get_result_info -------------------- "); $row_num = cubrid_num_rows($req); $col_num = cubrid_num_cols($req); $column_name_list = cubrid_column_names($req); $column_type_list = cubrid_column_types($req); $column_last_name = cubrid_field_name($req, $col_num - 1); $column_last_table = cubrid_field_table($req, $col_num - 1); $column_last_type = cubrid_field_type($req, $col_num - 1); $column_last_len = cubrid_field_len($req, $col_num - 1); $column_1_flags = cubrid_field_flags($req, 1); printf("%-30s %d ", "Row count:", $row_num); printf("%-30s %d ", "Column count:", $col_num); printf(" "); printf("%-30s %-30s %-15s ", "Column Names", "Column Types", "Column Len"); printf("------------------------------------------------------------------------------ "); $size = count($column_name_list); for($i = 0; $i < $size; $i++) { $column_len = cubrid_field_len($req, $i); printf("%-30s %-30s %-15s ", $column_name_list[$i], $column_type_list[$i], $column_len); } printf(" "); printf("%-30s %s ", "Last Column Name:", $column_last_name); printf("%-30s %s ", "Last Column Table:", $column_last_table); printf("%-30s %s ", "Last Column Type:", $column_last_type); printf("%-30s %d ", "Last Column Len:", $column_last_len); printf("%-30s %s ", "Second Column Flags:", $column_1_flags); printf(" "); } ?> The above example will output: ------------ get_result_info -------------------- Row count: 6 Column count: 2 Column Names Column Types Column Len ------------------------------------------------------------------------------ s_name char 1 f_name varchar 6 Last Column Name: f_name Last Column Table: code Last Column Type: varchar Last Column Len: 6 Second Column Flags: ------------ get_result_info -------------------- Row count: 4 Column count: 5 Column Names Column Types Column Len ------------------------------------------------------------------------------ event_code integer 11 athlete varchar 40 host_year integer 11 score varchar 10 unit varchar 5 Last Column Name: unit Last Column Table: history Last Column Type: varchar Last Column Len: 5 Second Column Flags: not_null primary_key unique_key SEE ALSO
cubrid_execute(3). PHP Documentation Group CUBRID_NEXT_RESULT(3)
All times are GMT -4. The time now is 06:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy