Search Results

Search: Posts Made By: hburnswell
12,144
Posted By RudiC
You were close. Try either eval echo \$$test ...
You were close. Try either
eval echo \$$test
5678
or
echo ${!test}
5678


Your approach might not be the best one. Ever thought about e.g. (associative) arrays?
8,493
Posted By Neo
With the costs of disks so cheap these days, you...
With the costs of disks so cheap these days, you are better to clone the disks and put them in a development / test server instead of removing the critical disks and testing them, with a plan to rush...
8,493
Posted By Peasant
Presenting snapshot luns will work fine, as long...
Presenting snapshot luns will work fine, as long as you don't present source and snapshots to the same box.

Rescan the fabric, followed by pvscan, then vgimport <your_group_from_pvscan>
Take care...
5,368
Posted By Chubler_XL
This idea comes to mind. Have a 3rd array with...
This idea comes to mind. Have a 3rd array with list of drives for subnet:

nfsenv="nfs-b2b-hg"
nfsoptions="rw,sync,no_root_squash"
lv=exports
mt="/nfs"
nfsgrp=nfsgroup
...
5,368
Posted By Chubler_XL
Lets look at this solution: ...
Lets look at this solution:

nfsenv="nfs-b2b-hg"
nfsoptions="rw,sync,no_root_squash"
lv=exports
mt="/nfs"
nfsgrp=nfsgroup
dirs_list="media hotdrive images"

clispec=(10.16.8.0/255.255.255.0...
1,475
Posted By bakunin
Not "really wrong", but you can optimise a bit....
Not "really wrong", but you can optimise a bit. Change:

$curl -s -u ${creds} -X POST "localhost:9200/_flush/synced" | \
grep -Eo "shards[^}]*failed\":[0-9]*" | \
sed -e...
1,475
Posted By RudiC
Go for $(curl ... | grep -Eo...
Go for

$(curl ... | grep -Eo "shards[^}]*failed\":[0-9]*")
1,475
Posted By Don Cragun
If task doesn't return a useful exit code (i.e.,...
If task doesn't return a useful exit code (i.e., always returns a zero exit status), one could still skip parsing counts and just loop until success is found:
while line=$(task)
do if [ "$line" =...
1,475
Posted By RudiC
Like Scrutinizer, I'd go for the "failed" count: ...
Like Scrutinizer, I'd go for the "failed" count:
while IFS=":}" read -a INARR <<< $(task) && [ 0 -ne "${INARR[${#INARR[@]}-1]}" ]; do :; done
1,475
Posted By Scrutinizer
Does the task not use an exit code ? You can test...
Does the task not use an exit code ? You can test for it until it is succesful
until task
do
:
done

This will run indefinitely if task will never be successful

Alternatively (bash/ksh)...
5,204
Posted By itkamaraj
Hi, why dont you try in for loop. with some sleep...
Hi, why dont you try in for loop. with some sleep time enabled. change the SOURCE_DIR and DESTINATION_DIR values according to your source and destination folder

#!/bin/bash...
5,204
Posted By rbatte1
You could be simpler with xargs and a call to...
You could be simpler with xargs and a call to another mini-script. A starter might be something like:-$ cat my_mover.sh
#!/bin/bash
#my_mover.sh script actually does the work

target_dir=$1 ...
1,593
Posted By Don Cragun
You just need to enable sudo on the script itself.
You just need to enable sudo on the script itself.
Forum: Open Source 06-10-2016
6,948
Posted By gull04
Hi Herb, I might be a bit old fashioned...
Hi Herb,

I might be a bit old fashioned here, but it used to be part of the SA's job to ensure that no one other than the SA had access to the root account. It also used to be drummed into SA's...
Forum: Open Source 06-10-2016
6,948
Posted By zaxxon
What makes you sure that they don't need root...
What makes you sure that they don't need root access? There are of course commands, that can be only issued as root. Sure they can be added to sudoers, but they would have to list every one of them...
Forum: Open Source 06-10-2016
6,948
Posted By Don Cragun
If you as a system administrator grant anyone...
If you as a system administrator grant anyone root access to your network (remotely or on-site) and they screw up, you are betting your future and the financial security (including all private data...
1,837
Posted By RudiC
Surprisingly enough, pilnet101's proposal worked...
Surprisingly enough, pilnet101's proposal worked in my GNU bash, version 4.3.11(1). I'm glad I learned something today (although a bit disappointed as I didn't find that feature in bash's man page)!...
1,837
Posted By pilnet101
Close, try changing your if condition to the...
Close, try changing your if condition to the following:

if [[ "$1" != @("-e"|"-d") ]]; then
1,886
Posted By Corona688
The trouble then is how to sort it after... So...
The trouble then is how to sort it after... So I'd modify your first one a little, converting it to a friendly unit in awk but still printing the original value for sorting.

$ find . -xdev -ls |...
1,886
Posted By bartus11
Try:find <dir> -xdev -ls | awk '{print...
Try:find <dir> -xdev -ls | awk '{print $7,$8,$9,$10,$11}' | sort -nr | head | nawk '{$1/=(1024*1024);$1=$1" MB"}1'
Showing results 1 to 20 of 20

 
All times are GMT -4. The time now is 05:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy