02-24-2016
As an addendum to RudiC's reply remember to allow for any duplicate numbers in generating the array _randomly_.
Once you have the array then randomly select your 6 numbers from the array of 30 numbers, again checking for possible duplicates...
9 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Hi all
I've got MacOSX server which is a UNIX based system. I've got 2 partiontion an I like to make just one partition on he disk without loosing any data on part1. Is there a way to do that kind of thing in UNIX or do I have to format everything and put up the system again?
Thanx for reading... (3 Replies)
Discussion started by: gardarm
3 Replies
2. UNIX for Dummies Questions & Answers
Hello All,
I just wanted to know what are the different ways of using commands in combination.
The most common one which i know is using pipes.
Also grouping is also done like ( ls; date) where output of both the commands is displayed.
Are there any other ways of combining various... (2 Replies)
Discussion started by: rahulrathod
2 Replies
3. UNIX for Dummies Questions & Answers
I want to show a output like this
Lee Ballancore
PID TTY TIME CMD
31799 pts/3 00:00:00 vim
31866 pts/3 00:00:00 vim
2495 pts/7 00:00:00 vim
8368 pts/0 00:00:00 vim
9544 pts/2 00:00:00 ps
Alistairr Rutherford
PID TTY TIME CMD
8368 pts/0 00:00:00 vim
9544 pts/2 00:00:00 ps
... (3 Replies)
Discussion started by: nehaquick
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I need to delete repeated nos in a file and finally list the count. Can some one assist me?
file:
12345
12345
56345
12345
23896
Output needed:
12345
56345
23896
Total count:3
Thanks (2 Replies)
Discussion started by: gini
2 Replies
5. Shell Programming and Scripting
Hi
I have 2 files like:
file1
a 12
b 1
a 3
file2
a 9
c 0
a 8
and i would like to get
a 12 a 9
a 3 a 8
i can do it with grep and paste with 3 lines. I tried to combine using: (3 Replies)
Discussion started by: Dedalus
3 Replies
6. Shell Programming and Scripting
Hello Group,
I have a file of data that contain
1
2
3
4
5
I request you help with a shell script for generate all posible combination of these numbers with the following output:
Example:
1 + 2 + 3 + 4 + 5 =
2 + 2 + 3 + 4 + 5 =
3 + 2 + 3 + 4 + 5 =
Thanks in advance.
Carlos (7 Replies)
Discussion started by: csierra
7 Replies
7. Shell Programming and Scripting
Hi All,
Please help me in below request.
Got multiple files in a dir ex: /os . from each file need to filter based upon first field (field only has 1,2,3 or 4) and then put it in different files based on the Field 1. But need to generate a sequence while inserting and the sequence number needs... (1 Reply)
Discussion started by: rdakshn
1 Replies
8. Programming
Is there any program that can create 6 digit numbers with:
(DIGIT_1)+(DIGIT_2)+(DIGIT_3)+(DIGIT_4)+(DIGIT_5)+(DIGIT_6)=10
Any perl or C also can. Anyone can help me? Thank you (6 Replies)
Discussion started by: Tzeronone
6 Replies
9. UNIX for Beginners Questions & Answers
Good morning, In a Production environment ive seen this command that kills processes
kill -9 -1
Because i am in a production environmet i can not execute this comamnd, so i would like to know what is the difference for the conventional kill -9 PID ?
Thanks a lot (11 Replies)
Discussion started by: alexcol
11 Replies
dbar(1) User Commands dbar(1)
NAME
dbar - ASCII progresbar
SYNOPSIS
echo <percentage> | dbar [options] <indicator text>
DESCRIPTION
dbar lets you define static 0% and 100% marks or you can define these marks dynamically at runtime. Static and dynamic marks can be mixed,
in this case the value specified at runtime will have a higher priority.
You can specify ranges of numbers, negative, positive or ranges with a negative min value and positive max value.
All numbers are treated as double precision floating point, i.e. the input is NOT limited to integers.
OPTIONS
-l Label to be prepended to the bar (default: "" ).
-nonl
no new line, don't put '
' at the end of the bar (default: do print "
")
-max
Value to be considered 100% (default: 100).
-min
Value to be considered 0% (default: 0).
-s Symbol represeting the percentage value in the meter (default: "=").
-w Number of charcaters to be considered 100% in the meter (default: 25)
EXAMPLES
Static 100% mark or single value input:
echo 25 | dbar -max 100 -l text
Output: text 25% [====== ]
If your 100% mark changes dynamically or 2-values input:
echo "50 150" | dbar
| |
| |__ max value
|
|__ value to display
Output: 33% [======== ]
If your value range is not between [0, maxval] or 3-values input:
echo "50 -25 150" | dbar
| | |
| | |__ max value 100% mark
| |
| |_____ min value 0% mark
|
|________ value to display
Output: 43% [=========== ]
Multiple runs:
for i in 2 20 50 75 80; do echo $i; sleep 1; done | dbar | dzen2
Output: Find out yourself.
ENVIRONMENT
None.
FILES
None.
SEE ALSO
dzen2(1)
AUTHORS
Program was written by Robert Manea <rob.manea@gmail.com>.
This manual page was written by Jari Aalto <jari.aalto@cante.net> for the Debian GNU system (but may be used by others). Released under
license GNU GPL version 2 or (at your option) any later version. For more information about license, visit
<http://www.gnu.org/copyleft/gpl.html>.
dbar 2012-04-02 dbar(1)