Sponsored Content
Operating Systems Linux Ubuntu How to creat a half-triangle in bash(Ubuntu)? Post 302779765 by wisecracker on Wednesday 13th of March 2013 10:57:02 AM
Old 03-13-2013
Not sure why you need the underscores but if is the asterisks that are important then you could try using escape codes to do it...

You will need to do the _animation_ yourself as it looks like a homework question...

the simple case however is:-
Code:
horiz=23
vert=11

printf "\x1B["$vert";"$horiz"f*"

Will print an asterisk at position 23 across and 11 down in a terminal window...

This is for bash, and might work on other shells...

Bazza, G0LCU...
 

8 More Discussions You Might Find Interesting

1. Programming

Creat-Crontab

Dear All, Please any send the idea and designing for creating the crontab in c Thank in advanced (2 Replies)
Discussion started by: dhinesh
2 Replies

2. AIX

Creat a File with a Specific Size

Hi everybody, Is there a command that can create a new file with a specific size? Thanks in advance. (3 Replies)
Discussion started by: aldowsary
3 Replies

3. Shell Programming and Scripting

shell script to print '*' triangle

plz tell me how to print * triangle like this * ** *** **** ***** (12 Replies)
Discussion started by: akash
12 Replies

4. Solaris

creat flash archive

I want take a flash backup by flar command for specific files like: / , /boot, /tmp I am trying this command but its not working # flar -n archive1 -f /,/boot,/tmp -F -c /home/arc1.flar Please can any body help me __.____._ (2 Replies)
Discussion started by: kmuqalled
2 Replies

5. Debian

creat image for the new kernel

Hello friends, I have compiled the kernel . But now i am facing the problem as to how we can create the initrd.img for the specific kernel. I was compiling the 2.6.29 kernel. to create initrd.img for 2.6.29 what i did is : cd /boot mkinitramfs-kpkg -o initrd.img-2.6.29 2.6.29... (2 Replies)
Discussion started by: pradeepreddy
2 Replies

6. Programming

help me with perl script that creat pdf

Hi, I have one xml file, I extracted some comments and saved in pdf file.I written code like this #!/usr/bin/perl use warnings; use strict; use PDF::API2; use PDF::API2::Page; use XML::LibXML::Reader; use Data::Dumper; my $file; open( $file, 'formal.xml'); my $reader =... (1 Reply)
Discussion started by: veerubiji
1 Replies

7. Shell Programming and Scripting

need help in writing shell script to generate pascal's triangle

Hi :) I am learning shell scripting, I need help, I would like to have a script that produces pascal's triangle as shown in the picture http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Pascal%27s_triangle_5.svg/250px-Pascal%27s_triangle_5.svg.png plz, help it's urgent thanks in... (1 Reply)
Discussion started by: angel1
1 Replies

8. Shell Programming and Scripting

Ubuntu 16 Bash strange output

Hello, I work in Ubuntu 16.04, I am new to Bash and something is wrong with my script, please help. I have a few hundreds of subjects data (like subj003.nii.gz, subj012.nii.gz etc. up to subj567.nii.gz) in a directory /usr/afewmoredirectories/subjects. I may run for each subject a command... (5 Replies)
Discussion started by: lim-lim
5 Replies
pbmtopk(1)						      General Commands Manual							pbmtopk(1)

NAME
pbmtopk - convert a portable bitmap into a packed (PK) format font SYNOPSIS
pbmtopk pkfile[.pk] tfmfile[.tfm] resolution [-s designsize] [-p num param...] [-C codingscheme] [-F family] [-f optfile] [-c num] [-W width] [-H height] [-D depth] [-I ital] [-h horiz] [-v vert] [-x xoff] [-y yoff] [pbmfile]... DESCRIPTION
Reads portable bitmaps as input, and produces a packed (PK) font file and a TFM (TeX font metric) file as output. The resolution parameter indicates the resolution of the font, in dots per inch. If the filename "-" is used for any of the filenames, the standard input stream (or standard output where appropriate) will be used. OPTIONS
-s designsize Sets the design size of the font, in TeX's points (72.27pt to the inch). The default design size is 1. The TFM parameters are given as multiples of the design size. -p num param... Sets the first num font parameters for the font. The first seven parameters are the slant, interword spacing, interword space stretchability, interword space shrinkability, x-height, quad width, and post-sentence extra space of the font. Math and symbol fonts may have more parameters; see The TeXbook for a list of these. Reasonable default values are chosen for parameters which are not specified. -C codingscheme Sets the coding scheme comment in the TFM file. -F family Sets the font family comment in the TFM file. -f optfile Reads the file optfile, which should contain a lines of the form: filename xoff yoff horiz vert width height depth ital The pbm files specified by the filename parameters are inserted consecutively in the font with the specified attributes. If any of the attributes are omitted, or replaced with "*", a default value will be calculated from the size of the bitmap. The settings of the -W, -H, -D, -I, -h, -v, -x, and -y options do not affected characters created in this way. The character number can be changed by including a line starting with "=", followed by the new number. Lines beginning with "%" or "#" are ignored. -c num Sets the character number of the next bitmap encountered to num. -W width Sets the TFM width of the next character to width (in design size multiples). -H height Sets the TFM height of the next character to height (in design size multiples). -D depth Sets the TFM depth of the next character to depth (in design size multiples). -I ital Sets the italic correction of the next character to ital (in design size multiples). -h horiz Sets the horizontal escapement of the next character to horiz (in pixels). -v vert Sets the vertical escapement of the next character to vert (in pixels). -x xoff Sets the horizontal offset of the next character to xoff (in pixels). -y yoff Sets the vertical offset of the next character to yoff (in pixels, from the top row). SEE ALSO
pktopbm(1), pbm(5) AUTHOR
Adapted from Tom Rokicki's pxtopk by Angus Duggan <ajcd@dcs.ed.ac.uk>. 6 August 1990 pbmtopk(1)
All times are GMT -4. The time now is 01:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy