Sponsored Content
Top Forums Shell Programming and Scripting split variable values into array Post 302197455 by finalight on Wednesday 21st of May 2008 03:07:03 AM
Old 05-21-2008
usr/bin/sh..I think it's bourne shell
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

split and making an array inside another array

I want to run an awk split on a value that has been pushed through an array and I was wondering what the syntax should be?? e.g. running time strings through an array and trying to examine just minutes: 12:25:30 10:15:13 08:55:23 awk ' NR==FNR{ ... (2 Replies)
Discussion started by: dcfargo
2 Replies

2. Shell Programming and Scripting

How to print array values whose name is inside a variable

I have a array as CArray=( a1 a2 ) and a1,a2,a3 are also array as: a1=(1 2 3) a2=(3 4 5) now I have this in my code: for i in `echo "${CArray}"` do echo ${$i} done It is giving error as :"bad substitution" It should give me value as 1 2 3 3 4 5 how can I get this...Can u please... (2 Replies)
Discussion started by: joshilalit2004
2 Replies

3. Shell Programming and Scripting

Piping Unix Variable Array values into AWK

#ksh Here is my code: ERRORLIST="43032 12001 12002 12003 12004 34019 49015 49016 49017 49018 49024 49025 49026 58004 72003 12005 12006 12007 12008 12011 12012 16024 16023" for ERROR in ${ERRORLIST} do awk -v l="$lastdate" '/^....-..-../&&$0>l{d=$0}d&&/Error: '"${ERROR}"'/{print... (3 Replies)
Discussion started by: k1ko
3 Replies

4. Shell Programming and Scripting

[Perl] Split lines into array - variable line items - variable no of lines.

Hi, I have the following lines that I would like to see in an array for easy comparisons and printing: Example 1: field1,field2,field3,field4,field5 value1,value2,value3,value4,value5Example 2: field1,field3,field4,field2,field5,field6,field7... (7 Replies)
Discussion started by: ejdv
7 Replies

5. Shell Programming and Scripting

Store values from a file into an array variable in Shell

Dear All, I have been trying to do a simple task of extracting 2 fields from the file (3 rows) and store it in an array variable. I tried with: #! /bin/bash ch=`cut -f10 tmp.txt` counter=0 for p in $pid do c=${ch} echo "$c ..$counter" counter=$((counter+1))... (2 Replies)
Discussion started by: ezhil01
2 Replies

6. Shell Programming and Scripting

storing multiple values in a array variable

Am using a find command in my script .The output may be one or more. I need to store those values in a array and need to access those. Am unable to find the solution . Any help on this will be helpful. if < code> else a=<find command output which gives the file name either 1 or more> if 1... (1 Reply)
Discussion started by: rogerben
1 Replies

7. Shell Programming and Scripting

error while updating rows in sql with values in array variable

Hi, I need to update rows in a table based on the values in an array variable. code is : while read line do error_msg="$(echo $line)" index=`expr $index+1` done <"logs/$ffile" rows_count=${#error_msg } i=0 while do echo "error msgs is... (2 Replies)
Discussion started by: RP09
2 Replies

8. Shell Programming and Scripting

How to get value from array and set those values as a variable

I am new to ksh scripting, specially array. How do i get values from an array and set the value as variable and pass those variables to the different functions?? someone taught me how to get input from a file with have columns i need to read, but now i doesnt know how to set those value to be a... (7 Replies)
Discussion started by: gavin_L
7 Replies

9. Shell Programming and Scripting

Array Variable being Assigned Values in Loop, But Gone when Loop Completes???

Hello All, Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....? I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies

10. Shell Programming and Scripting

Attach variable to array values

Hi All, Need a help. I am just learning Shell scripting. Need a requirement like to attach variable to array values. Value of from is AF and to is AD. froml=$(echo $from | tr '' '') tol=$(echo $to | tr '' '') Schemas=(AWQM WFCONTROLLER PROVCO PRISM) for s in "${Schemas}" do ... (3 Replies)
Discussion started by: pvmanikandan
3 Replies
USE(1)								   User Commands							    USE(1)

NAME
use - Frontend to the Usepackage Environment Manager SYNOPSIS
csh and derivatives: source /usr/share/usepackage/use.csh bourne shell and derivatives: source /usr/share/usepackage/use.bsh korn shell: . /usr/share/usepackage/use.ksh use [-vs] [-f file] package ... use -l DESCRIPTION
Usepackage is an environment management program. It is based on the principle of packages - collections of executables that share a common set of necessary environment variables, such as PATH, MANPATH or LD_LIBRARY_PATH. For each given package, use sources the appropriate environment information into the current shell. The environment information is speci- fied in a configuration file, see usepackage(1). OPTIONS -v Output verbose information to the standard error stream. -s Silence warnings for un-matched packages. This is useful in a shell rc script when a package is known not to be available on all architectures that the shell is used on. -f file Specify an alternate initial configuration file. -l List available packages and groups. FILES
/usr/share/usepackage/usepackage.conf The default configuration file. /usr/share/usepackage/use.csh Shell setup for csh and derivatives. /usr/share/usepackage/use.bsh Shell setup for bourne shell and derivatives. /usr/share/usepackage/use.ksh Shell setup for ksh. /usr/bin/usepackage The underlying Usepackage executable. ENVIRONMENT
Other than the reading and re-definition of environment variables for package setup, use also uses the following environment variables for user configuration: PACKAGES_PATH Colon-separated path list giving the directories to search for configuration files. Shell-style tilde (~) user-directory escapes are expanded. HOME If present in the environment, this is used to provide the expansion for the tilde (~) user-directory. SHELL If present in the environment, the last path component of this is used for shell matching (see SYNTAX) and detecting the style of environment output that should be used, see usepackage(1). COPYRIGHT
Usepackage Environment Manager Copyright (C) 1995-2005 Jonathan Hogg This program 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 2 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 MER- CHANTABILITY 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA SEE ALSO
usepackage(1), csh(1), sh(1), ksh(1) Usepackage $Date: 2005/12/11 16:42:09 $ USE(1)
All times are GMT -4. The time now is 02:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy