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
let(1)                                                             User Commands                                                            let(1)

NAME
let - shell built-in function to evaluate one or more arithmetic expressions SYNOPSIS
ksh let arg... DESCRIPTION
ksh Each arg is a separate "arithmetic expression" to be evaluated. EXIT STATUS
The following exit values are returned: 0 The value of the last expression is non-zero. 1 The value of the last expression is zero. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
ksh(1), set(1), typeset(1), attributes(5) SunOS 5.10 15 Apr 1994 let(1)
All times are GMT -4. The time now is 12:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy