Tagged Questions
0
votes
1answer
27 views
Zsh script how to concatanate array elements with string
I have written a zsh script to automize an analysis in high energy physics and now I would like to use an element of the one of the defined array some string and another element of some another array ...
2
votes
2answers
239 views
Creating an array with IFS set to a different value
I am trying to construct an array and write to a file in this format, i.e. the file's content should be something like this
hero_pairscore=( askdjfh sdf,sdlkfj lksf,dfgdf,dsflkgj,asdlkf ....)
Where ...
1
vote
1answer
84 views
Is there a simple way to get array of all arguments that do not begin with a hyphen?
zsh includes a powerful utility for parsing command-line options zparseopts, but for quick shell scripts and shell functions, but is there an easy way to extract the array of all command-line ...
1
vote
1answer
305 views
Problem with sed on a array containing strings containing spaces
I have a array looking like this:
array=("(1 2 3) (123)" "2 31 (231)" "4 5 1 (451)" "(te)xt (1234)")
This array is a example. It does not look like this but its structure is the same (the strings ...
2
votes
1answer
923 views
Array of string expanded to path?
Suppose I have the following initialization of bash array:
my_array=(
"/usr/bin"
"/usr/lib/*.so"
)
If I do iteration using:
for array_item in ${my_array[@]}
do
...
done
Then the ...