Bash isn't very efficient looking up large arrays I found using bash 4 assoicative arrays gave me a significant boost in speed if you have bash 4 consider using them:
Interesting.... I did some further testing with bash 3, bash 4 and ksh93 (for the associative array I used the synonym typeset -A instead of declare -A which works both in bash4 and ksh93:
There seems to be an issue with regular arrays in bash that is absent in ksh93 which processes both types of arrays at the same speed...
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Below is a test script I was trying to use so that I could understand why the logic was not working in a larger script. While accessing and printing array data inside the while loop, everything is fine. Outside the loop, i guess everything is null?? The for loop that is meant to cycle... (4 Replies)
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)
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)
I have created a RAID10 array (near layout) with four 8 GiB virtual hard drives, making a 16 GiB array (/dev/md0 formatted as ext4). On the other hand, I have a 16 GiB RAID1 array (/dev/md1, also formatted as ext4).
The purpose of these setups is to compare the read and write performances of each... (13 Replies)
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)
I am trying to check whether particular host and port are responding or not. I am using below script to check. but node_port array that i am using in loop is getting replaced with previous iteration value. Script and output is given.
Please help me to understanding why node_port values are... (5 Replies)
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)
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
LEARN ABOUT CENTOS
grub-render-label
GRUB-RENDER-LABEL(1) User Commands GRUB-RENDER-LABEL(1)NAME
grub-render-label - generate a .disk_label for Apple Macs.
SYNOPSIS
grub-render-label [OPTION...] [OPTIONS]
DESCRIPTION
Render Apple .disk_label.
-b, --bgcolor=COLOR
use COLOR for background
-c, --color=COLOR
use COLOR for text
-f, --font=FILE
use FILE as font (PF2).
-i, --input=FILE
read text from FILE.
-o, --output=FILE
set output filename. Default is STDOUT
-t, --text=STRING
set the label to render
-v, --verbose
print verbose messages.
-?, --help
give this help list
--usage
give a short usage message
-V, --version
print program version
Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.
REPORTING BUGS
Report bugs to <bug-grub@gnu.org>.
SEE ALSO
The full documentation for grub-render-label is maintained as a Texinfo manual. If the info and grub-render-label programs are properly
installed at your site, the command
info grub-render-label
should give you access to the complete manual.
grub-render-label (GRUB) 2.02-2ubuntu8.3 July 2018 GRUB-RENDER-LABEL(1)