9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
i have this basic code that i wrote to read a file and place it's values to an array. the source/input file will have multiple strings on it that is separated by a whitespace.
sample_list.txt file contents:
ACCT1 TABLE1
ACCT2 TABLE2
ACCT3 TABLE3
script file: sample_list.sh
... (3 Replies)
Discussion started by: wtolentino
3 Replies
2. Shell Programming and Scripting
is it possible to assign value to an array variable from an external file?? if yes then how??
I am using below code but its not working.
#!bin/bash
myarray < file_name
echo ${mayarray} (6 Replies)
Discussion started by: mukulverma2408
6 Replies
3. Shell Programming and Scripting
Hi,
I have requirement to assign values to variables which are created dynamically.
Below is the code which i am using to achieve above requirement.
#!/bin/ksh
oIFS="$IFS"; IFS=','
STR_FAIL_PARENT_IF_FAILS="WF_F_P_IF_FAILS1,WF_F_P_IF_FAILS2,WF_F_P_IF_FAILS3"
set -A... (1 Reply)
Discussion started by: tmalik79
1 Replies
4. Shell Programming and Scripting
Hi every one.. I'm new to shell scripting... I would like to assign a single array element to a variable... Is it possible to do it....
Could any body help me.... (3 Replies)
Discussion started by: kaushik_87
3 Replies
5. Shell Programming and Scripting
Hi,
I have a piece of code as follows:
i=0
while read LINE
do
var = "$LINE"
i=$((i+1))
echo "${var}"
done < file
I want to assign value to the array var.
However, when i execute the script i get a error.
Please can you help me know what i am missing.
I ultimately want to... (2 Replies)
Discussion started by: sunrexstar
2 Replies
6. Shell Programming and Scripting
I want to ask the user to enter an X amount of file names. I want to put those names into an array and then loop back through them to verify they are in the directory. 1st- How would I assign the value to an array and what is the correct syntax. 2nd- how would i reference that array after I... (3 Replies)
Discussion started by: tvb2727
3 Replies
7. Shell Programming and Scripting
Greetings folks,
I am trying to assign the output of a dscl command (contains name<spaces>id) to a variable as an array. Currently I am piping the output into a tmp file, then reading the tmp file into an array, then parsing the array. I would like to bypass creating the tmp file portion of... (6 Replies)
Discussion started by: macnetdaemon
6 Replies
8. Shell Programming and Scripting
I am trying to write a piece of code that will call a value from an array. There are multiple arrays that I need to call data from. Only one array needs to be used based on the step within the program. The arrays have the names "cue_0", "cue_1", and so on.
I can't figure out how to call a value... (2 Replies)
Discussion started by: vockleya
2 Replies
9. Shell Programming and Scripting
I am trying to assign the contents of file e.g
ls "$HOME"
into an array. If it is possible then please guide me without using the concept of awk,sed, and perl16
Thanks (10 Replies)
Discussion started by: murtaza
10 Replies