I have a perl script with an array of clients.
@arr = ("The ABC Corp", "AA Corp.", "BB Corp");
If I run
@a = sort (@arr);
I will get
@a = ("AA Corp", "BB Corp", "The ABC Corp");
but I want
@a = ("AA Corp, "The ABC Corp", "BB Corp");
How do I sort array without changing... (2 Replies)
Some one plz help me how to sort an array of hashes .....
for e.g i have an array as
@AoH = (
{
ques => 10,
marks => 32,
},
{
ques => 32,
marks => 22,
},
{
ques => 2,
marks => 41,
},
);
now i want to sort this array with increasing value of "ques" ..... plz... (3 Replies)
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)
Hello to everyone!
I'm really new in shell scripting and I'm experiencing a very odd problem. This is my first post in this forum, hope you can help!
I know that declaring arrays in Bourne Shell is impossible. But this is where I start having problems - system administrator did not install... (8 Replies)
Hi Everyone,
Any simple code can simplify the code below, please advice. Thanks
# cat 2.pl
#!/usr/bin/perl
use warnings;
use strict;
my @aaaaa = <DATA>;
my @uids;
foreach (@aaaaa) {
my @ccccc = split (",", $_);
push @uids, $ccccc;... (3 Replies)
Hi I'm just learning programming and need some help.
I've taken a data file which has a list of numbers eg:
3
5
32
533
13
2
And I've used sort -n and to sort and then piped it to awk to arrange into an array.
#!/bin/sh
sort -n data.txt |
awk '
{
array=$1
} (4 Replies)
Hi,
I'm new to linux & bash so please forgive my ignorance, just wondering if anyone can help.
I have a file (mainfile.txt) with comma deliminated values, like so:
$1 $2 $3
613212, 36, 57
613212, 36, 10
613212, 36, 10
677774, 36, 57
619900, 10, 10
i need to split this file... (12 Replies)
Hi,
input:
line1|error_type_a@15
line1|error_type_c@10
line1|error_type_b@5
line2|error_type_f@3
line2|error_type_a@1
I would need to place all the second fields with common first field on the same line, BUT with sorted error position number:
line1|error_type_b@5; error_type_c@10;... (5 Replies)
Hi there,
I'm listing files and sorting them. When I try to get length of array variable in which these files are stored I get 1 as value. That's weird.
files_info="$(find $input_dir -name "*_CHR$i.info" | sort )"
printf ${#files_info}"\n" #print length
#--loop through... (6 Replies)
Hello
I have a problem.
I create a Multidimensional Array Like this:
ENTRY="$kunnum-$host"
ENTRY="$host"
ENTRY="# $3"
for key in "${!ENTRY}"; do
ENTRIES=${ENTRY} # INDEX=IP(5)
donedeclare -p
declare -A ENTRIES=(="unas15533" ="unas" ="# RDP-Terminal 2"... (12 Replies)
Discussion started by: Marti95
12 Replies
LEARN ABOUT DEBIAN
raidfile-config
RAIDFILE-CONFIG(8) Box Backup RAIDFILE-CONFIG(8)NAME
raidfile-config - Configure Box Backup's RAID files
SYNOPSIS
raidfile-config config-dir blocksize dir1 [dir2 [dir3]]
DESCRIPTION
raidfile-config creates a raidfile.conf file for Box Backup. This file holds information about the directories used to store backups in.
Box Backup supports userland RAID, in a restricted RAID5 configuration, where 3 and only 3 'drives' are supported. You can read more about
RAID5 (and other RAID-levels) here[1].
Parameters
The parameters are as follows:
config-dir
The directory path where configuration files are located. Usually this is /etc/box. raidfile.conf will be written in this directory.
blocksize
The block size used for file storage in the system, in bytes. Using a multiple of the file system block size is a good strategy.
Depending on the size of the files you will be backing up, this multiple varies. Of course it also depends on the native block size of
your file system.
dir1
The first directory in the built-in RAID array.
dir2
The second directory in the built-in RAID array. If you are not using the built-in RAID functionality, this field should be ignored.
You should not use the built-in RAID if you have a hardware RAID solution or if you're using another type of software RAID (like md on
Linux).
dir3
The third directory in the built-in RAID array. The same notes that apply to dir2 also apply to dir3.
Note that there are currently no way to add multiple disk sets to the raidfile.conf file using command line tools, etc. See
raidfile.conf(5) for details on adding more disks.
BUGS
If you find a bug in Box Backup, and you want to let us know about it, join the mailing list[2], and send a description of the problem
there.
To report a bug, give us at least the following information:
o The version of Box Backup you are running
o The platform you are running on (hardware and OS), for both client and server.
o If possible attach your config files (bbstored.conf, bbackupd.conf) to the bug report.
o Also attach any log file output that helps shed light on the problem you are seeing.
o And last but certainly not least, a description of what you are seeing, in as much detail as possible.
FILES
raidfile-config generates the raidfile.conf(5) file.
SEE ALSO bbstored-config(8), bbstored.conf(5), raidfile.conf(5)AUTHORS
Ben Summers
Per Thomsen
James O'Gorman
NOTES
1. here
http://en.wikipedia.org/wiki/Redundant_array_of_independent_disks#RAID_5
2. mailing list
http://lists.warhead.org.uk/mailman/listinfo/boxbackup
Box Backup 0.11 10/28/2011 RAIDFILE-CONFIG(8)