Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

factor(1) [minix man page]

FACTOR(1)						      General Commands Manual							 FACTOR(1)

NAME
factor - factor an integer less than 2**31 SYNOPSIS
factor number EXAMPLES
factor 450180 # Print the prime factors of 450180 DESCRIPTION
Factor prints the prime factors of its argument in increasing order. Each factor is printed as many times as it appears in the number. FACTOR(1)

Check Out this Related Man Page

FACTOR(6)							 BSD Games Manual							 FACTOR(6)

NAME
factor -- factor a number SYNOPSIS
factor [number ...] DESCRIPTION
The factor utility factors integers larger than 1. When a number is factored, it is printed, followed by a ``:'', and the list of (prime) factors on a single line. Factors are listed in ascending order, and are preceded by a space. If a factor divides a value more than once, it will be printed more than once. When factor is invoked with one or more arguments, each argument will be factored. When factor is invoked with no arguments, factor reads numbers, one per line, from standard input, until end of file or error. Leading white-space and empty lines are ignored. Numbers may be preceded by a single +. Integer less than 2 are rejected. Numbers are terminated by a non-digit character (such as a newline). After a number is read, it is factored. Input lines must not be longer than LINE_MAX - 1 (currently 2047) characters. By default, factor is compiled against the OpenSSL bignum implementation openssl_bn(3), which lets it handle arbitrarily large values. (Note however that very large values can take a very long time to factor.) If factor is compiled without OpenSSL it is limited to the maximum value of unsigned long. DIAGNOSTICS
Out of range or invalid input results in an appropriate error message being written to standard error. BSD
May 15, 2010 BSD
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

My partition disappeared!!!! URGENT!! (newbie factor)

I just inst freeBSD boot installation and it didnt work for(probably my lack of knowledge) reasons but i now have to partitions in freeBSD and i really need them back for windows at the moment. i just cant find them. The bad thing is that i only got this bundled version of windows so i cant really... (2 Replies)
Discussion started by: riwa
2 Replies

2. UNIX for Dummies Questions & Answers

Factorize some rows in a column

HI! I have a file containing a column of numbers with 69 rows. I won't to factorize row 20 to 50 with 1.03 How do I do that? (I'm a beginner as you easily can understand) (5 Replies)
Discussion started by: frebo
5 Replies

3. Programming

Compiling multiple cpp files (abstract factory pattern)

Hi all, I have been working with java for awhile and because of my school projects I needed to switch C++. I tried to implement some patterns in C++ but unfortunately I couldn't. Specifically, I tried to implement abstract factory pattern but since I used separated files (habitual behavior from... (4 Replies)
Discussion started by: SaTYR
4 Replies

4. Shell Programming and Scripting

get positive number n as argument script must calculate the factorial of its argument

Can someone please help me with this SHELL script? I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1. Here is a start but I have no clue how to... (3 Replies)
Discussion started by: I-1
3 Replies

5. Shell Programming and Scripting

BASH: Factorial using FOR loop not working

Hi, I am trying to run the factorial script but it’s not working. The code is mentioned below: ------------------------------------------------------------------ /home/gc> cat fact.sh #!/bin/bash # using one command line parameter factorial=1 for (( number = 1; number <= $1 ;... (3 Replies)
Discussion started by: Technext
3 Replies

6. Shell Programming and Scripting

Factorial of any number using functions

how to write the code for factorial of any number using functions and arguments????? (7 Replies)
Discussion started by: kullu
7 Replies

7. Homework & Coursework Questions

Refactoring via SHELL utilities

I am completely new to Shell scripting and I have almost no idea what I'm doing here. I'm not a stranger at all to programming, but the way SHELL is done drives me to insanity. Here's my current issue: 1. We are to create a BASH script called rafactor.sh This program takes in two (or three)... (6 Replies)
Discussion started by: Okysho
6 Replies

8. Shell Programming and Scripting

shell, read table and write the value for each factor to output

Hey guyz, I have a table like this: 1 A=#;B=#;C=# 2 A=#;C=#;D=#;E=#;E=# 3 B=#;B=#;B=#;D=# # are just some numbers. I want to have the output like this: * 1 2 3 A # # NA B # NA # C # # NA D NA # # E NA # NA So basically, I wanna know in each of the rows in my input (which... (9 Replies)
Discussion started by: @man
9 Replies

9. Shell Programming and Scripting

README: Factorial quick chart with sed & bc:

Hi all, While doing some checks I found a kind of interesting arithmetic factorial chart with sed, sharing this may be simple but thought to share, # n=20;for i in `seq $n`;do printf "`seq $i|xargs|sed 's/ /*/g'`= ";echo "`seq $i|xargs|sed 's/ /*/g'`"| bc;done 1= 1 1*2= 2 1*2*3= 6... (6 Replies)
Discussion started by: rveri
6 Replies

10. Shell Programming and Scripting

Help on writing data from 2 different files to one based on a common factor

Hello all, I have 2 text files. For example: File1.txt contains data A B C D ****NEXT**** X Y Z ****NEXT**** L M N and File2.txt contains data (13 Replies)
Discussion started by: vat1kor
13 Replies

11. HP-UX

Multi-factor authentication

Is anyone here familiar with implementing multi-factor authentication on HP-UX 11.31? Either with a PIV card, or with an RSA token? We've been tasked with implementing this on our servers, but I'm not finding much in the way of products or information. To complicate matters, our servers are... (6 Replies)
Discussion started by: lupin..the..3rd
6 Replies

12. UNIX for Beginners Questions & Answers

How do I use grep to grab prime number output from my factor program?

I have a factor program that runs and outputs to stdout all the prime numbers that are specified in the given paramters, in this case 30000000-31000000. Command: factor/factor 30000000-31000000 Sample output: 30999979 = 30999979 30999980 = 2^2 5 11 140909 30999981 = 3 10333327... (6 Replies)
Discussion started by: steezuschrist96
6 Replies

13. Solaris

T4-2 - Memory DIMM issue - ldom config resets to factory-default

Which basically means the ldoms that were on there are not starting (not even showing). If I do ldm list-config it shows live config as next reboot. But, of course, next reboot it reverts back to factory default again. I must admit I'm wondering if its doing this becasue (with the... (3 Replies)
Discussion started by: psychocandy
3 Replies

14. Linux

Setting Up Google 2F Authentication for Automated (Crontab) rsync

Dear All, I have Google Two Factor (2F) Authentication enabled for sshd on most of my Linux servers. This works well and I highly recommend it. My question is: Has anyone set this up for rsync which runs in a crontab? For example, supposed we have this simple crontab script: ... (5 Replies)
Discussion started by: Neo
5 Replies