Search Results

Search: Posts Made By: cbreiny
6,575
Posted By cbreiny
Change count='expr $count + 1' to ...
Change
count='expr $count + 1'
to
count=$(expr $count + 1)
Forum: Programming 11-19-2010
1,242
Posted By cbreiny
Line printing.
#include <iostream>

int main() {

int x=0;
int y=1000;

while(x<1000) {
x++, y--;
system("clear");
printf("\n%d\n%d", x,y);
fflush(stdout);

}

return 0;

}...
1,856
Posted By cbreiny
Read input
I have a script.

#! /bin/bash

echo "Enter a word: "
read word
echo $word

That outputs like this..

Enter a word:
hello
hello

But how can i read on the same line the question is...
Forum: Programming 11-17-2010
1,723
Posted By cbreiny
Find a line containing a string.
Hello. I have a large file that contains a lot of gibberish and also a lot of http addresses. How can i read the file, take out the http addresses, and write each one of them on one line each into...
15,258
Posted By cbreiny
Find line containing string in a file.
Hello. I have a large file that contains a lot of gibberish and also a lot of http addresses. How can i read the file, take out the http addresses, and write each one of them on one line each into...
Forum: Programming 10-28-2010
3,854
Posted By cbreiny
4-Byte Salt (in hex) to Integer
If i have a salt that looks like this 'CFDB024F' (in hex) would the integer value be '3487236687' ?
Is that correct?
Forum: Programming 10-25-2010
2,179
Posted By cbreiny
Wow thank you very much! Works great. Much more...
Wow thank you very much! Works great. Much more efficient.
Forum: Programming 10-25-2010
16,003
Posted By cbreiny
C++ Special Characters in a String?
Hello. How can i put all of the special characters on my keyboard into a string in c++ ?

I tried this but it doesn't work.

string characters("~`!@#$%^&*()_-+=|\}]{["':;?/>.<, ");

How can i...
Forum: Programming 10-24-2010
2,179
Posted By cbreiny
C++ help
I am new to C++ and programming in general. (Only 1 years experience with python and some perl)

I wrote a program that creates all possible words using the character set (char_set) =...
Forum: Programming 10-24-2010
2,541
Posted By cbreiny
Beginning C++
I want to learn C++ ! :)
I have basic programming knowledge with python and perl.
Does anyone know of any great beginner tutorials for C++?
Forum: Programming 10-24-2010
4,140
Posted By cbreiny
Python program faster than C++ program.
I wrote a simple program that generates a random word 10,000,000 times.
I wrote it in python, then in C++ and compared the two completion times. The python script was faster! Is that normal? Why...
Forum: Programming 10-23-2010
3,827
Posted By cbreiny
C++ Beginner Problem With Optget
Hi. I am new to C++. But I am trying to write a basic program that uses the command line. But...
$ ./myscript -s 1 -e 8 -c billy -v 1 -o test

I get output like this...
Starting Length = 1 ...
2,109
Posted By cbreiny
Mac OS X Password
I want to know the exact process of how Mac OS X takes a string(password) and encrypts it. I know the encrypted file is stored in /var/db/shadow/hash/<GUID>

But..
1) How does the string get to...
13,949
Posted By cbreiny
Python update already printed line.
Hi. I have a basic script in python that outputs like this..

$ ./test.py
1%
2%
3%
4%
5%
6%
7%
8%
9%
10%
...

But how can I make it so the output stays in 1 line?
So it would look...
2,340
Posted By cbreiny
Thank you so much! Works great!
Thank you so much! Works great!
2,340
Posted By cbreiny
Turn python script into an installed UNIX command (Mac OS X)
Okay so i have a script i wrote in python. I want to turn this script into an INSTALLED COMMAND to run in terminal.

Right now i run it like this in terminal...

$ python myscriptname.py
or
$...
18,810
Posted By cbreiny
Auto run script on USB device
Okay I want to write a script that I put on a jump drive. And when you plug the USB in this script executes. How would i go about doing this? I don't care what the program does right now. I just want...
Showing results 1 to 17 of 17

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