Sponsored Content
Full Discussion: Combination of numbers
Top Forums Shell Programming and Scripting Combination of numbers Post 302496024 by kurumi on Friday 11th of February 2011 10:16:01 PM
Old 02-11-2011
Ruby(1.9.1+)
Code:
 $ ruby -e 'a=File.read("file").split; a.permutation(a.length).to_a.each {|x| puts x.join}'

This User Gave Thanks to kurumi For This Post:
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Partition combination

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

Combination Of commands

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

combination of two commands

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. Shell Programming and Scripting

read numbers from file and output which numbers belongs to which range

Howdy experts, We have some ranges of number which belongs to particual group as below. GroupNo StartRange EndRange Group0125 935300 935399 Group2006 935400 935476 937430 937459 Group0324 935477 935549 ... (6 Replies)
Discussion started by: thepurple
6 Replies

5. Shell Programming and Scripting

Escape and combination

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

the smallest number from 90% of highest numbers from all numbers in file

Hello All, I am having problem to find what is the smallest number from 90% of highest numbers from all numbers in file. I am having file with thousands of lines and hundreds of columns. I am familiar mainly with bash but I am open to whatever suggestion witch will lead to the solutions. If I... (11 Replies)
Discussion started by: Apfik
11 Replies

7. UNIX for Dummies Questions & Answers

Print numbers and associated text belonging to an interval of numbers

##### (0 Replies)
Discussion started by: lucasvs
0 Replies

8. Programming

6 digits combination

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. Shell Programming and Scripting

Combination of 6 nos

Hi folks, I have a numbers from 1-100 and from these nos I have 30 numbers.. From this 30 nos, I have to generate a combination of 6 nos... this 30 numbers will range from 1-100... ( FYI: This is not a lottery game - just kidding) ... I am trying out this in a shell script.. any ideas ? (3 Replies)
Discussion started by: gsiva
3 Replies

10. UNIX for Beginners Questions & Answers

Kill -9 -1 combination

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
SUBTLEXT(1)															       SUBTLEXT(1)

NAME
subtlext - a ruby extension for subtle SYNOPSIS
subtlext DESCRIPTION
subtlext is an extension that brings the power of subtler to Ruby. A compending list of the classes with it's functionality can be found in rdoc and informations about the available unit tests in the devel- opment section. EXAMPLE
require("subtle/subtlext") puts "subtle %s on %s" % [Subtlext::Subtle.version, Subtlext::Subtle.running? ? Subtlext::Subtle.display : "none"] puts "Tags: %s" % [Subtlext::Tag[:all].join(", ")] # Views views = [] Subtlext::View[:all].each do |v| views.push("%s (%s)" % [v.current? ? "[#{v}]" : v, v.tags.join(", ")]) end puts "Views: %s" % [views.join(", ")] # Clients clients = [] Subtlext::Client[:all].each do |c| clients.push("%s (%s)" % [c, c.tags.join(", ")]) end puts "Clients: %s" % [clients.join(", ")] OUTPUT
subtle 0.8.1684 on :0.0 Tags: default, test, void, terms, browser, editor, stick, float, eight, two, seven, one, bashrun, sakura, python Views: terms (terms, eight, two), [www] (browser, eight, two), void (default, void, eight, two), editor (test, editor, seven, one) Clients: urxvt2 (two, one), urxvt1 (eight, seven), subtle - Subtlext - Redmine - Vimperator (browser), Xephyr on :2.0 (ctrl+shift grabs mouse and keyboard) (test, float), event.c (~/projects/subtle/src/subtle) - GVIM (editor) BUGS
Report bugs at http://subforge.org/projects/subtle/issues Homepage: http://subtle.subforge.org COPYRIGHT
Copyright (c) Christoph Kappel unexist@subforge.org SEE ALSO
subtle(1), subtler(1), sur(1), surserver(1) October 2011 SUBTLEXT(1)
All times are GMT -4. The time now is 02:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy