Help with Using "while" loop to output series of numbers


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with Using "while" loop to output series of numbers
# 8  
Old 07-24-2013
lazy math-less way:

Code:
for N in 0 1 2 3 4 5 6 7 8 9
do
        STR="$STR $N"
        echo "$STR ."
done

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Failure: if grep "$Var" "$line" inside while read line loop

Hi everybody, I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o My code: #!/bin/sh set -e set -u export IFS= optl="Optl" LOCSTORCLI="/opt/lsi/storcli/storcli" ($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies

3. AIX

"Frames" and "Words" in fcstat output

What are "Frames" and "Words" in the fcstat output? vio1:/home/padmin:# fcstat fcs0 <snip> Transmit Statistics Receive Statistics ------------------- ------------------ Frames: 122844229 363445456 Words: 50940091904 171210861568 <snip> The... (1 Reply)
Discussion started by: kah00na
1 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

6. UNIX for Dummies Questions & Answers

Explanation of "total" field in "ls -l" command output

When I do a listing in one particular directory (ls -al) I get: total 43456 drwxrwxrwx 2 root root 4096 drwxrwxrwx 3 root root 4096 -rwxrwxr-x 1 nobody nobody 3701594 -rwxrwxr-x 1 nobody nobody 3108510 -rwxrwxr-x 1 nobody nobody 3070580 -rwxrwxr-x 1 nobody nobody 3099733 -rwxrwxr-x 1... (1 Reply)
Discussion started by: proactiveaditya
1 Replies

7. Solaris

significance of "+" char in SunOS "ls -l" output

Hi, I've noticed that the permissions output from "ls -l" under SunOS differs from Linux in that after the "rwxrwxrwx" field, there is an additional "+" character that may or may not be there. What is the significance of this character? Thanks, Suan (6 Replies)
Discussion started by: sayeo
6 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

9. Debian

Debian: doubt in "top" %CPU and "sar" output

Hi All, I am running my application on a dual cpu debian linux 3.0 (2.4.19 kernel). For my application: <sar -U ALL> CPU %user %nice %system %idle ... 10:58:04 0 153.10 0.00 38.76 0.00 10:58:04 1 3.88 0.00 4.26 ... (0 Replies)
Discussion started by: jaduks
0 Replies
Login or Register to Ask a Question
gozer(1)						      General Commands Manual							  gozer(1)

NAME
gozer - a commandline text renderer SYNOPSIS
gozer [options] [file] DESCRIPTION
gozer is a commandline text rendering utility for creating images from abitrary text in antialised truetype fonts using optional fontstyles, wordwrapping and layout control. gozer uses the imlib2 library to create and save images. gozer has a few options, detailed below. Specify [file] as the filename to save the rendered text to. Options can also be specified in an rc file , allowing you to save com- monly used options (such as fontpaths) for reuse. The rc file $HOME/.gozerrc is always parsed for default settings, and other rc files can be specified on the commandline to override these options. See RC FILES for information on syntax. OPTIONS
-h, --help display help output and exit. -v, --version output version information and exit. -b, --background COL use COL as the background color, see COLOUR_DEFINITIONS for syntax, default is transparent (0,0,0,0). -f, --foreground COL use COL as the foreground color. Default is white (255,255,255,255). -F, --font STR draw using font STR. Size is specified with the name, eg 'arial/12' for 12pt arial, default is 20thcent/16 (a font supplied by gozer). -j, --justification STR justify text, allowed values for STR are left, right, center or block. Default is left. -l, --line-spacing INT separate multiple lines by INT pixels, default 1. -p, --fontpath STR colon seperated list of font directories to search for fonts in. Best used in the RCFILE to save typing it each time. -q, --quality INT 1-100, effects quality of output for certain formats, e.g. jpeg compression (higher means higher quality). -P, --pipe Pipe input text from standard in instead of reading it from a file. -r, --rc-file STR use STR as the rc file to look for extra options, default is $HOME/.gozerrc -s, --style STR use STR as a file to load a fontstyle from, see FONTSTYLES for syntax. -t, --text STR use STR as text to draw. -T, --textfile STR read text to draw from file STR. -w, --wrap INT wordwrap the text to INT pixels. -x, --x-offset INT Offset text horizontally from top left by INT pixels. -y, --y-offset INT Offset text vertically from top left by INT pixels. RC FILES
rc file syntax is simple. The '#' character at the start of a line denotes that the line is a comment, otherwise lines are started with the name of a long option from the commandline (without prefixing the --), some whitespace and the value of the option. E.g. fontpath /usr/share/truetype:/usr/local/share/truetype NOTE that options in a --rc-file specified rc file OVERRIDE those from the commandline, but the $HOME/.gozerrc file is always read first for default settings. COLOUR_DEFINITIONS You can define colours in 4 ways. Using the html style: #RRGGBB (in which case alpha defaults to 255), #RRGGBBAA, or an alternative style: r,g,b or r,g,b,a (no spaces between commas please). eg for white text, either use #ffffff, #ffffffff, "255,255,255" or "255,255,255,255". For red, #ff0000, #ff0000ff or "255,0,0" etc. FONTSTYLES
fontstyles can be defined in the EFM syntax (for compatibility only, these are not as powerful), or the recommended syntax defined here. The first line contains the line: #Style The second, an optional style name, #NAME mystyle There follows a list of layers. Each is described by this rule: RED GREEN BLUE ALPHA X_OFFSET Y_OFFSET The special values or 0,0,0,0 for red, green, blue and alpha specify the positioning of the actual text in it's selected colour. For example, the following style defines a very simple shadow for text: #Style #NAME shadow 0 0 0 128 -3 -3 0 0 0 0 0 0 BUGS
None known. LICENSE
Copyright Tom Gilbert 2000 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies of the Software, its documentation and marketing & publicity materials, and acknowledgment shall be given in the documentation, materials and software packages that this Software was used. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MER- CHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Email bugs and feature requests to <gozer_sucks@linuxbrit.co.uk> Oct 26, 2000 gozer(1)