Search Results

Search: Posts Made By: Kweekwom
3,823
Posted By Kweekwom
Perl Prime number help
Hello,

I have some extra time at work and I'm trying to come up with a good prime number generator for very large numbers that can take advantage of multiple (hundreds) cores. I realize Perl may...
64,985
Posted By Kweekwom
This code works fine for me. if [ $? == 0 ] ...
This code works fine for me.

if [ $? == 0 ]
then
echo "hello"
else
echo "goobye"
fi
7,797
Posted By Kweekwom
I would if I knew how :confused: This may be...
I would if I knew how :confused:

This may be a dumb question, but how do I get the list in an array?

Thanks.
7,797
Posted By Kweekwom
Thanks! Will this only select one of the numbers...
Thanks! Will this only select one of the numbers from the list?
7,797
Posted By Kweekwom
Help with AWK and RANDOM please
Hi, here's what I'm trying to do,

I used awk to separate numbers from a file into a list like this:

4536
23426
452
7647
35637
35635
35653

Now I need to randomly select one of this...
12,162
Posted By Kweekwom
Thanks! I didn't realize people were finding...
Thanks! I didn't realize people were finding these numbers on personal computers, I guess I may make the leader board considering each core has 4 GB of memory :)
12,162
Posted By Kweekwom
Prime Number Program (Fun)
Hi,

I was just wondering if anyone has, or knows where to download a prime number finder program. I would like a fairly simple bash program, and also I would like one that could take advantage of...
4,607
Posted By Kweekwom
Thanks! It seems to be working fine.
Thanks! It seems to be working fine.
4,607
Posted By Kweekwom
Thanks for looking into it Klashxx, When I...
Thanks for looking into it Klashxx,

When I try your suggestion, and say I input these numbers:

255 256 280 290

I get this error:

awk: cmd. line:6: fatal: cannot open file `255' for...
4,607
Posted By Kweekwom
Thanks again for your help drl, but I apparently...
Thanks again for your help drl, but I apparently don't have the wdiff command available to me. Any other ideas? Thanks!
4,607
Posted By Kweekwom
Thanks for the help, but this doesn't work quite...
Thanks for the help, but this doesn't work quite right either.

If for example, I enter the following:

Input1: 1 2 6 4 70
Input2: 1 6 2 4 80 90 670

I get the following response:

Nodes...
4,607
Posted By Kweekwom
rubin, Thanks a lot for looking into it! It...
rubin,

Thanks a lot for looking into it! It works perfectly for the example I gave, however if I enter something like this:

input1= 1 2 3 4 5 80 90

input2= 1 2 3 4 5 6 80 90


I get this...
4,607
Posted By Kweekwom
Help with showing the difference in two lines of input
I would like my script to be able to tell the difference between to lines of input, like:

Input 1:
1 2 3 4 5
Input 2:
1 2 3 4 5 6

I want the script to tell me that the difference between the...
7,697
Posted By Kweekwom
Wow drl, that's really cool. It works just as I...
Wow drl, that's really cool. It works just as I need it to! I'll definitely delve deeper into those commands so I can understand them better. Thanks so much for your help!
7,697
Posted By Kweekwom
drl, Are you saying I need to get each of...
drl,

Are you saying I need to get each of the numbers into a separate line?
7,697
Posted By Kweekwom
I really don't know how I would go about it doing...
I really don't know how I would go about it doing it manually.

I'm sorry, I didn't mean to have those comma's in there. Even with no comma's in the line, it still doesn't sort.

I guess I need...
7,697
Posted By Kweekwom
Awesome! Thanks drl, it worked perfectly. ...
Awesome! Thanks drl, it worked perfectly.

Hopefully I only have one more question now.

I do what you suggested, and I want to sort the output of "eval echo" numerically, so I do this:
...
7,697
Posted By Kweekwom
Okay, now I'm having another problem with my...
Okay, now I'm having another problem with my script.

If I type:

echo {12..18}

It will spit out:

12 13 14 15 16 17 18

However, my script looks like this:

echo "Input first set of...
7,697
Posted By Kweekwom
Thank you drl and everyone else for your help, it...
Thank you drl and everyone else for your help, it worked great!

Thanks again!
7,697
Posted By Kweekwom
KevinADC, Thanks for looking into it. I...
KevinADC,

Thanks for looking into it. I tried it and got this error:

sed: -e expression #1, char 32: invalid reference \2 on `s' command's RHS


Is there anymore info I can give you to make...
7,697
Posted By Kweekwom
Sed Question?
Hi,

Here's what I'm trying to do. I have a set of numbers like this:

12-13 15-18 23-28 36-38 42-43 53-56 70-72 76 80-86 93-110 119-128

But I want to echo the ranges of numbers. Is there any...
2,387
Posted By Kweekwom
OK, thanks. So how exactly would I fix this...
OK, thanks. So how exactly would I fix this script? This script is used for finding and entering the directory that the .parentlock file is located for firefox.

#!/bin/bash

direc=$(find -name...
2,387
Posted By Kweekwom
cd problems in bash
Hi,

I'm having problems with the "cd" command in bash not changing directories. From what I've read, I've gathered that scripts are child processes and can't change the directory of their parent...
13,398
Posted By Kweekwom
You're right, I named the script "while"...
You're right, I named the script "while" https://www.unix.com/images/smilies/tongue.gif

Thanks for your help!
13,398
Posted By Kweekwom
Thanks. I was wondering if it was something like...
Thanks. I was wondering if it was something like that. I was sure I had used that same syntax before and it worked.

Thanks again.
Showing results 1 to 25 of 29

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