Sponsored Content
Full Discussion: how to create an array
Top Forums Shell Programming and Scripting how to create an array Post 302591224 by daPeach on Wednesday 18th of January 2012 10:20:51 PM
Old 01-18-2012
an array seems useless in this case
Code:
for (( x=1; x<=365; x++)); do printf -v maVar '%.2d' $x; command >1999$maVar; done

btw, arithmetic expansion is done inside array elements without the need of double parenthesis, ${array[n++]} should work.

Last edited by daPeach; 01-18-2012 at 11:30 PM..
This User Gave Thanks to daPeach For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create array holding characters from sring then echo array.

Hi, I wish to store $string1 in $string1array a character in each array element. Then i wish to echo the entire array to the screen so that it reads as the normal string again. I have been trying with the code below but does not work. Please help... To put string into array: ... (5 Replies)
Discussion started by: rorey_breaker
5 Replies

2. UNIX for Dummies Questions & Answers

Create an array with awk

List, I want to have an array created of a particular item in the following textfile: router> show user Se4/0:29 site1 Sync PPP - Bundle: Di372 Se5/0:29 site2 Sync PPP - Bundle: Di340 router> The array should have 2 entries, site1 and site2 ... (2 Replies)
Discussion started by: philipz
2 Replies

3. UNIX for Advanced & Expert Users

Create RAID - Smart Array Tool - ML370

Hi guys, i must install an old old old ml370 server... I must create a RAID 5 with my 4 SCSI disk. I need a SmartStart disk for create it or a Floppy Disk called "Array configuration Tool". I don't find it on the hp website...:mad::mad::mad: Anyone have it?? Thanks in advance. Zio (0 Replies)
Discussion started by: Zio Bill
0 Replies

4. Shell Programming and Scripting

How do I create an array from a file using every 3rd line

A file contains the following information shown below. Every ceName has 2 consecutive lines that have to be evaluated, using awk, sed, cut (any common unix tools). Input file: ceName: Node-1 processName: tzMgmt Status: PROCESS_NOT_RUNNING ceName: Node-2 processName: tzMgmt Status:... (15 Replies)
Discussion started by: BRH
15 Replies

5. Shell Programming and Scripting

How to create dynamically associative array in PHP?

Hi, I have an html page like this: <html> <body> <form action="test.php" method = "post"> Enter your name:<input name="search" type = "text" size ="40"> <br> Enter your age:<input name="age" type = "text" size ="20"> <input type = "submit" name="submit" value="search"> <input type =... (1 Reply)
Discussion started by: vanitham
1 Replies

6. Solaris

Configure disk array in RAID5 and create file system

I'm new to forums, it's my first time posting. I have a sun v490 server. I just installed solaris 10.6, on the local drives. I'm being asked to do the following: For Oracle install I need “oracle” user that belong to “dba” and “oinstall” groups. File system /u01/app/oracle, 10GB (if... (6 Replies)
Discussion started by: Kjons76
6 Replies

7. Shell Programming and Scripting

every time user input create array perl

Hi, How to create array every time user input and store user input and display all array print " Enter input " my @input = split(' ', $input) chmop($input = <STDIN>; foreach ($input) { @array= @input; } print @array"\n"; (1 Reply)
Discussion started by: guidely
1 Replies

8. UNIX for Dummies Questions & Answers

create an array of numbers in awk

Hi ! I try to create an array of a large amount of numbers in increasing order from 1 to 10,000 (or even infinity). Is there an easier way to do that than writing: split("1,2,3,4,5,6,7,8,9,10,11,12,13,14,..............,10000",numbers,",") Doing something like: split(,numbers) Thanks ! (2 Replies)
Discussion started by: lucasvs
2 Replies

9. Shell Programming and Scripting

create an array which can store the strings from the user input in shell script

I want to create an array which can store the strings from the user input in shell script . example :- I want to store the 5 fruits name in a single array which the user provides . (1 Reply)
Discussion started by: Pkast
1 Replies

10. OS X (Apple)

Create a bash array from a flat file of whitespaces only.

Hi guys and gals... MacBook Pro. OSX 10.13.2, default bash terminal. I have a flat file 1920 bytes in size of whitespaces only. I need to put every single whitespace character into a bash array cell. Below are two methods that work, but both are seriously ugly. The first one requires that I... (7 Replies)
Discussion started by: wisecracker
7 Replies
dlartv.f(3)							      LAPACK							       dlartv.f(3)

NAME
dlartv.f - SYNOPSIS
Functions/Subroutines subroutine dlartv (N, X, INCX, Y, INCY, C, S, INCC) DLARTV Function/Subroutine Documentation subroutine dlartv (integerN, double precision, dimension( * )X, integerINCX, double precision, dimension( * )Y, integerINCY, double precision, dimension( * )C, double precision, dimension( * )S, integerINCC) DLARTV Purpose: DLARTV applies a vector of real plane rotations to elements of the real vectors x and y. For i = 1,2,...,n ( x(i) ) := ( c(i) s(i) ) ( x(i) ) ( y(i) ) ( -s(i) c(i) ) ( y(i) ) Parameters: N N is INTEGER The number of plane rotations to be applied. X X is DOUBLE PRECISION array, dimension (1+(N-1)*INCX) The vector x. INCX INCX is INTEGER The increment between elements of X. INCX > 0. Y Y is DOUBLE PRECISION array, dimension (1+(N-1)*INCY) The vector y. INCY INCY is INTEGER The increment between elements of Y. INCY > 0. C C is DOUBLE PRECISION array, dimension (1+(N-1)*INCC) The cosines of the plane rotations. S S is DOUBLE PRECISION array, dimension (1+(N-1)*INCC) The sines of the plane rotations. INCC INCC is INTEGER The increment between elements of C and S. INCC > 0. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 109 of file dlartv.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 dlartv.f(3)
All times are GMT -4. The time now is 09:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy