Sponsored Content
Top Forums Shell Programming and Scripting every time user input create array perl Post 302559478 by guidely on Tuesday 27th of September 2011 07:33:33 AM
Old 09-27-2011
every time user input create array perl

Hi, How to create array every time user input and store user input and display all array

Code:
print " Enter input "
my @input  = split(' ', $input)
chmop($input = <STDIN>;
foreach ($input)
{
 @array= @input;
}
print @array"\n";

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sh shell user input and stote it to a array

Dear Friends, I am doing a sh shell script , But I dont have any idea how to read value from user Keyboard and store them to an array .. Is it possible or not I am not also sure in sh shell script ? EX:- #! /bin/sh read DATA echo "DATA -" $DATA echo "DATA -" $DATA echo "DATA... (7 Replies)
Discussion started by: user_prady
7 Replies

2. UNIX for Dummies Questions & Answers

How to display values from user input array?

Hi all, I wrote a script that reads inputs from user and store in array named "input". The number of elements in the array is not fixed - determined only after user exit the while loop that reads the array values : x=1 echo "Enter first value" read input while } != "exit" ] do ... (1 Reply)
Discussion started by: luna_soleil
1 Replies

3. Shell Programming and Scripting

Create a multi user input form

Hi All, Please ignore if terminology used is incorrect as I am new to Unix. I want to create a Multi user input form which looks something like this: ABCD TOOL Logged User: abcd12 ... (4 Replies)
Discussion started by: vidhu0007
4 Replies

4. Shell Programming and Scripting

Assign user input to already declared array

What I am doing is creating a top menu, which a user will select a choice with a number entry. That number corresponds to a string in an array. I then want to assign that response to another array I've already declared. For example: #!/bin/bash colors=(red blue yellow) red=(cherry fire)... (2 Replies)
Discussion started by: Akilleez
2 Replies

5. Shell Programming and Scripting

How to automatically create variables from user input in ksh?

I need some help to write a ksh script. My code so far (pretty bad, sorry): #! /bin/ksh echo "Calculate average" UserDecision=y while test $UserDecision = y do echo "Enter a number: " read Number1 echo "Enter a number: " read Number2 echo "Do you want to enter another number?... (2 Replies)
Discussion started by: johnagar
2 Replies

6. Shell Programming and Scripting

no chance to input passwd when create new user in loop

Hi Dears, I have one script to create new users with information in one plain text file. This script will read all lines in the file and create one users for one line. Sample file: #action;login,full name title,expire date,project +;gmwen,Bruce Wen QA,04/01/2012,BT +;xxdeng,Shown Deng... (4 Replies)
Discussion started by: crest.boy
4 Replies

7. 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

8. Shell Programming and Scripting

Process running time by taking user input

Need help in scripting . Below is the situation and need your inputs Checking all the processes, scripts running time based on user input time . Below Example ps -aef -o user,pid,etime,stime,args| grep sleep <user> 28995 01:24 14:14:39 sleep 120 <user> 29385 00:52 14:15:10... (8 Replies)
Discussion started by: ajayram_arya
8 Replies

9. Shell Programming and Scripting

Automaticaly create function based off user input

I am trying to create a bash script that will create new function by using the user input. The below will create the necessary files in the correct format, however when it comes to the # create function I am at a loss. If the name entered was NEWNAME and the genes were GENE1,GENE2 then two files... (0 Replies)
Discussion started by: cmccabe
0 Replies

10. Shell Programming and Scripting

How to embed data instead of reading user input from an array?

Hello, I am running under ubuntu1 14.04 and I have a script which is sending given process names to vanish so that I'd see less output when I run most popular tools like top etc in terminal window. In usual method it works. Whenever I restart the system, I have to enter the same data from... (2 Replies)
Discussion started by: baris35
2 Replies
CGTTS2(l)								 )								 CGTTS2(l)

NAME
CGTTS2 - solve one of the systems of equations A * X = B, A**T * X = B, or A**H * X = B, SYNOPSIS
SUBROUTINE CGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB ) INTEGER ITRANS, LDB, N, NRHS INTEGER IPIV( * ) COMPLEX B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * ) PURPOSE
CGTTS2 solves one of the systems of equations A * X = B, A**T * X = B, or A**H * X = B, with a tridiagonal matrix A using the LU factoriza- tion computed by CGTTRF. ARGUMENTS
ITRANS (input) INTEGER Specifies the form of the system of equations. = 0: A * X = B (No transpose) = 1: A**T * X = B (Transpose) = 2: A**H * X = B (Conjugate transpose) N (input) INTEGER The order of the matrix A. NRHS (input) INTEGER The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0. DL (input) COMPLEX array, dimension (N-1) The (n-1) multipliers that define the matrix L from the LU factorization of A. D (input) COMPLEX array, dimension (N) The n diagonal elements of the upper triangular matrix U from the LU factorization of A. DU (input) COMPLEX array, dimension (N-1) The (n-1) elements of the first super-diagonal of U. DU2 (input) COMPLEX array, dimension (N-2) The (n-2) elements of the second super-diagonal of U. IPIV (input) INTEGER array, dimension (N) The pivot indices; for 1 <= i <= n, row i of the matrix was interchanged with row IPIV(i). IPIV(i) will always be either i or i+1; IPIV(i) = i indicates a row interchange was not required. B (input/output) COMPLEX array, dimension (LDB,NRHS) On entry, the matrix of right hand side vectors B. On exit, B is overwritten by the solution vectors X. LDB (input) INTEGER The leading dimension of the array B. LDB >= max(1,N). LAPACK version 3.0 15 June 2000 CGTTS2(l)
All times are GMT -4. The time now is 11:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy