Sponsored Content
Full Discussion: How to pad spaces
Top Forums Shell Programming and Scripting How to pad spaces Post 28907 by Perderabo on Thursday 26th of September 2002 07:36:57 AM
Old 09-26-2002
In ksh you can use the typeset command:
typeset -L30 fieldA
typeset -R15 fieldB
echo "${fieldA}${fieldB}"
 

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
PG_FIELD_NUM(3) 														   PG_FIELD_NUM(3)

pg_field_num - Returns the field number of the named field

SYNOPSIS
int pg_field_num (resource $result, string $field_name) DESCRIPTION
pg_field_num(3) will return the number of the field number that corresponds to the $field_name in the given PostgreSQL $result resource. Note This function used to be called pg_fieldnum(3). PARAMETERS
o $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others). o $field_name - The name of the field. RETURN VALUES
The field number (numbered from 0), or -1 on error. EXAMPLES
Example #1 Getting information about fields <?php $dbconn = pg_connect("dbname=publisher") or die("Could not connect"); $res = pg_query($dbconn, "select author, year, title from authors where author = 'Orwell'"); echo "Column 'title' is field number: ", pg_field_num($res, 'title'); ?> The above example will output: Column 'title' is field number: 2 SEE ALSO
pg_field_name(3). PHP Documentation Group PG_FIELD_NUM(3)
All times are GMT -4. The time now is 09:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy