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

NAME
SUMO - Importer of polygons and POIs for the road traffic simulation SUMO SYNOPSIS
polyconvert [OPTION]* DESCRIPTION
SUMO polyconvert Version 0.15.0 Copyright (C) 2001-2012 DLR and contributors; http://sumo.sourceforge.net Importer of polygons and POIs for the road traffic simulation SUMO. Configuration Options: -c, --configuration-file FILE Loads the named config on startup --save-configuration FILE Saves current configuration into FILE --save-template FILE Saves a configuration template (empty) into FILE --save-schema FILE Saves the configuration schema into FILE --save-commented Adds comments to saved template, configuration, or schema Input Options: -n, --net-file FILE Loads SUMO-network FILE as reference to offset and projection --dlr-navteq-poly-files FILE Reads polygons from FILE assuming they're coded in DLR-Navteq (Elmar)-format --dlr-navteq-poi-files FILE Reads pois from FILE+ assuming they're coded in DLR-Navteq (Elmar)-format --visum-files FILE Reads polygons from FILE assuming it's a Visum-net --xml-files FILE Reads pois and shapes from FILE assuming they're coded in XML --osm-files FILE Reads pois from FILE+ assuming they're coded in OSM --osm.keep-full-type The type will be made of the key-value - pair. --osm.use-name The id will be set from the given 'name' attribute. --shapefile-prefixes FILE Reads shapes from shapefiles FILE+ --shapefile.guess-projection Guesses the shapefile's projection --shapefile.id-column FILE Defines in which column the id can be found --type-file FILE Reads types from FILE Output Options: -o, --output-file FILE Write generated polygons/pois to FILE Projection Options: --simple-projection Uses a simple method for projection --proj.scale INT Number of places to shift decimal point to right in geo-coordinates --proj.utm Determine the UTM zone (for a universal transversal mercator projection based on the WGS84 ellipsoid) --proj.dhdn Determine the DHDN zone (for a transversal mercator projection based on the bessel ellipsoid) --proj STR Uses STR as proj.4 definition for projection --proj.inverse Inverses projection Pruning Options: --prune.in-net Enables pruning on net boundaries --prune.in-net.offsets STR Uses STR as offset definition added to the net boundaries --prune.boundary STR Uses STR as pruning boundary --prune.keep-list STR Items in STR will be kept though out of boundary --prune.explicit STR Items with names in STR will be removed Processing Options: --offset.x FLOAT Adds FLOAT to net x-positions --offset.y FLOAT Adds FLOAT to net y-positions Building Defaults Options: --color STR Sets STR as default color --prefix STR Sets STR as default prefix --type STR Sets STR as default type --layer INT Sets INT as default layer --discard Sets default action to discard Report Options: -v, --verbose Switches to verbose output -p, --print-options Prints option values before processing -?, --help Prints this screen -V, --version Prints the current version -W, --no-warnings Disables output of warnings -l, --log FILE Writes all messages to FILE (implies verbose) --message-log FILE Writes all non-error messages to FILE (implies verbose) --error-log FILE Writes all warnings and errors to FILE EXAMPLES
polyconvert -c <CONFIGURATION> run with configuration options set in file REPORTING BUGS
Report bugs at <http://sourceforge.net/apps/trac/sumo/>. Get in contact via <sumo-user@lists.sourceforge.net>. Copyright (C) 2001-2012 DLR and contributors; http://sumo.sourceforge.net SUMO polyconvert Version 0.15.0 is part of SUMO. SUMO is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/gpl.html SUMO polyconvert Version 0.15.0 May 2012 SUMO(1)