10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
A bit new to bash and am having an issue with a for loop. I look for filenames in a specified directory and pull the date string from each meeting a certain criteria, and then would like to make a directory for each date found, like this:
search 20180101.gz 20180102.gz 20180103.gz... (5 Replies)
Discussion started by: mwheeler12
5 Replies
2. Shell Programming and Scripting
Hello,
i have a script that i need account_number to match a name.
for exsample :
ACCOUNT_ID=(IatHG8DC7mZbdymSoOr11w KbnlG2j-KRQ0-1_Xk356s8)
and i run a loop curl requst with this the issue is that i want to know on
which account were talking about so bash will know this :
... (4 Replies)
Discussion started by: batchenr
4 Replies
3. Shell Programming and Scripting
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
4. Shell Programming and Scripting
Hi,
I have the following code which is giving error mentioned below. Please can you support on this. Also suggest how can we access all the items against single vasservicename in circlename array,i.e, vasservicename say MTSTV will be available to all circles which are mentioned in the array... (2 Replies)
Discussion started by: siramitsharma
2 Replies
5. Shell Programming and Scripting
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Discussion started by: briandanielz
4 Replies
6. Shell Programming and Scripting
seeking assistance on comparing two arrays using bash:
array1=(disk1, disk2, disk3, disk5, disk7, vol1, vol2, vol3, vol4, vol5)
array2=(disk2, disk5 vol2, vol4 )
1) if two arrays have same elements; EXIT
else populate array3 & array4 with elements that are different between array1 & array2 as:... (3 Replies)
Discussion started by: solaix14
3 Replies
7. OS X (Apple)
I am using code as below to save data in associated array on Mac OS 10.8.
#!/bin/sh
storyboardExt=".storyboard"
stringsExt=".strings"
newStringsExt=".strings.new"
oldStringsExt=".strings.old"
localeDirExt=".lproj"
baseLprojDir="Base${localeDirExt}"
echo "${baseLprojDir}"
# Find... (2 Replies)
Discussion started by: mikezang
2 Replies
8. Shell Programming and Scripting
sorry I am new to the bash scripting since I was used to c shell programming. I am writting a script in bash for which I have to create an array in bash. I was able to do parse one variable through command line by doing": Lets say the below code is part of temp.bash and is called like:
temp.bash... (5 Replies)
Discussion started by: dixits
5 Replies
9. Shell Programming and Scripting
hi friends.,
i have two files yy.dat and mm.dat containing 110 elements in each
if i read them into variables it is just showing only 4 elements instead of 110 elements
My script is like this
##################################
/bin/bash
declare -a yy=(`cat yy.dat`)
echo "No of values in... (1 Reply)
Discussion started by: yagnesh
1 Replies
10. Shell Programming and Scripting
I'm trying to move files based on a certain day..my question is on array's, what's wrong with the way I'm stepping through the array? what i have gives me syntax errors..any ideas...so far I have
#! /bin/bash
sun_d=`cal |grep -v |awk '{printf " " $1}' `
echo "$sun_d"
ls -l... (1 Reply)
Discussion started by: gubten
1 Replies