10 More Discussions You Might Find Interesting
1. 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
2. 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
3. UNIX for Dummies Questions & Answers
Hi, I would like to remove audio tracks from several video clips contained in a single directory using the command
files=(*.mpg); ffmpeg -i "${files}" -vcodec copy -an na/output.mpg
I want each processed file outputted to the sub-directory na retaining the original file name, how do I do that?... (4 Replies)
Discussion started by: jeppe83
4 Replies
4. 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
5. 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
6. Shell Programming and Scripting
I have some version problem to use this code in my server
while read line; do
read -A array <<<$line <---------- the server dont read <<<
n=${#array}
for ((i=1;i<$n;i++)); do
print "${array}"
done
func=${array}
data1=${array}
data2=${array}
... (1 Reply)
Discussion started by: gavin_L
1 Replies
7. 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
8. UNIX for Dummies Questions & Answers
Hey
How do I sort an array numerically after the second column?
My values are integers like 1, 2, 3, 4... and they are not unique, so I can't just reverse my hash and sort by keys.
I wanna sort my file/array so that I get the lines with the highest value in the top - that is descending. ... (2 Replies)
Discussion started by: Banni
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have two files:
file 1 has a list :
ABC_1024
ABC_4507
ABC_5589
ERT_4389
DDB_5507
file 2 has an array:
ABC_1011,ABC_1024,ABC_5670 DDB_4567 ERT_2345 January08
ABC_9099 DDB_9087 ERT_4567 March07
I need to go line by line in file 1... (2 Replies)
Discussion started by: greptastic
2 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