Sponsored Content
Full Discussion: Pad 0 to the right
Top Forums UNIX for Beginners Questions & Answers Pad 0 to the right Post 303042892 by Aia on Thursday 9th of January 2020 09:03:38 PM
Old 01-09-2020
One way in Bash could be:
Code:
n=$(printf "%-9s" 2457)
printf "%s\n" ${n// /0}
245700000

These 3 Users Gave Thanks to Aia For This Post:
 

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. Shell Programming and Scripting

How to pad spaces

Hello, I have to write a function to input a Label and a number, and output a line as the following format: Column 1 to 30: field label, left justified. Column 31 to 45: A number, right justified. The middle is padded with space. May I know how can I achieve this? (I don't know how to count... (3 Replies)
Discussion started by: sarahho
3 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. Programming

How to right pad with zeros using sprintf?

I need to right-pad with zeros a string by using (s)printf. I looked up the manual and tried with printf("%-19s", buffer); which right-pad the string with spaces. So I tried printf("%019s", buffer); which left-pad the string with zeros. So I tried both printf("%-019s", buffer);... (9 Replies)
Discussion started by: emitrax
9 Replies

7. Shell Programming and Scripting

Pad Zeros at the end

I have number/strings like below input =23412133 output = 234121330000 (depends on the number give at runtime) i need to padd zeros based on runtime input . i tried below printf ' %d%04d\n', "23412133"; But the precision 4 is static here how can i pass this as runtime input. i am... (11 Replies)
Discussion started by: greenworld123
11 Replies
GStreamer::Pad(3pm)					User Contributed Perl Documentation				       GStreamer::Pad(3pm)

NAME
GStreamer::Pad - Object contained by elements that allows links to other elements HIERARCHY
Glib::Object +----GStreamer::Object +----GStreamer::Pad METHODS
pad or undef = GStreamer::Pad->new ($name, $direction) o $name (string) o $direction (GStreamer::PadDirection) pad or undef = GStreamer::Pad->new_from_template ($templ, $name) o $templ (GStreamer::PadTemplate) o $name (string) boolean = $pad->accept_caps ($caps) o $caps (GStreamer::Caps) boolean = $pad->activate_pull ($active) o $active (boolean) boolean = $pad->activate_push ($active) o $active (boolean) $pad->set_active ($active) o $active (boolean) caps or undef = $srcpad->get_allowed_caps boolean = $pad->set_blocked ($blocked) o $blocked (boolean) caps = $pad->get_caps boolean = $pad->set_caps ($caps) o $caps (GStreamer::Caps or undef) flowreturn = $pad->chain ($buffer) o $buffer (GstBuffer) boolean = $pad->check_pull_range paddirection = $pad->get_direction boolean = $pad->event_default ($event) o $event (GstEvent) $pad->fixate_caps ($caps) o $caps (GStreamer::Caps) list = $pad->get_internal_links_default list = $pad->get_internal_links boolean = $pad->is_active boolean = $pad->is_blocked boolean = $pad->is_blocking Since: gst 0.10 boolean = $pad->is_linked iterator = $pad->iterate_internal_links Since: gst 0.10 iterator = $pad->iterate_internal_links_default Since: gst 0.10 boolean = $srcpad->link ($sinkpad) o $sinkpad (GStreamer::Pad) caps or undef = $pad->get_negotiated_caps caps = $pad->get_pad_template_caps padtemplate = $pad->get_pad_template boolean = $pad->pause_task boolean = $pad->peer_accept_caps ($caps) o $caps (GStreamer::Caps) pad = $pad->get_peer caps = $pad->peer_get_caps boolean = $pad->peer_query ($query) o $query (GstQuery) Since: gst 0.10 list = $pad->pull_range ($offset, $size) o $offset (64 bit unsigned) o $size (integer) flowreturn = $pad->push ($buffer) o $buffer (GstBuffer) boolean = $pad->push_event ($event) o $event (GstEvent) boolean = $pad->query ($query) o $query (GstQuery) boolean = $pad->query_default ($query) o $query (GstQuery) list = $pad->get_query_types_default list = $pad->get_query_types list = $pad->get_range ($offset, $size) o $offset (64 bit unsigned) o $size (integer) boolean = $pad->send_event ($event) o $event (GstEvent) boolean = $pad->start_task ($func, $data=undef) o $func (scalar) o $data (scalar) boolean = $pad->stop_task $srcpad->unlink ($sinkpad) o $sinkpad (GStreamer::Pad) PROPERTIES
'caps' (GStreamer::Caps : default undef : readable / private) The capabilities of the pad 'direction' (GStreamer::PadDirection : default "unknown" : readable / writable / construct-only / private) The direction of the pad 'template' (GStreamer::PadTemplate : default undef : readable / writable / private) The GstPadTemplate of this pad SIGNALS
linked (GStreamer::Pad, GStreamer::Pad) unlinked (GStreamer::Pad, GStreamer::Pad) request-link (GStreamer::Pad) boolean = have-data (GStreamer::Pad, GStreamer::MiniObject) ENUMS AND FLAGS
enum GStreamer::FlowReturn o 'custom-success-2' / 'GST_FLOW_CUSTOM_SUCCESS_2' o 'custom-success-1' / 'GST_FLOW_CUSTOM_SUCCESS_1' o 'custom-success' / 'GST_FLOW_CUSTOM_SUCCESS' o 'resend' / 'GST_FLOW_RESEND' o 'ok' / 'GST_FLOW_OK' o 'not-linked' / 'GST_FLOW_NOT_LINKED' o 'wrong-state' / 'GST_FLOW_WRONG_STATE' o 'unexpected' / 'GST_FLOW_UNEXPECTED' o 'not-negotiated' / 'GST_FLOW_NOT_NEGOTIATED' o 'error' / 'GST_FLOW_ERROR' o 'not-supported' / 'GST_FLOW_NOT_SUPPORTED' o 'custom-error' / 'GST_FLOW_CUSTOM_ERROR' o 'custom-error-1' / 'GST_FLOW_CUSTOM_ERROR_1' o 'custom-error-2' / 'GST_FLOW_CUSTOM_ERROR_2' enum GStreamer::PadDirection o 'unknown' / 'GST_PAD_UNKNOWN' o 'src' / 'GST_PAD_SRC' o 'sink' / 'GST_PAD_SINK' SEE ALSO
GStreamer, Glib::Object, GStreamer::Object COPYRIGHT
Copyright (C) 2005-2011 by the gtk2-perl team. This software is licensed under the LGPL. See GStreamer for a full notice. perl v5.14.2 2012-03-01 GStreamer::Pad(3pm)
All times are GMT -4. The time now is 12:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy