Search Results

Search: Posts Made By: tsurko
Forum: Programming 04-08-2011
3,087
Posted By tsurko
And sprintf() to save the number back to a string.
And sprintf() to save the number back to a string.
Forum: Programming 04-08-2011
2,675
Posted By tsurko
K&R is very good book, but in my opinion you...
K&R is very good book, but in my opinion you should have some knowledge about the language first. Also here are some resources i found useful: Cprogramming.com: How to Get Started with C++...
Forum: Programming 11-04-2009
28,506
Posted By tsurko
One more thing - you call return system() in...
One more thing - you call return system() in for(). return will terminate main() immediately so you won't have your script executed argc times. I'd suggest to save the return value of system in new...
Forum: Ubuntu 10-15-2009
8,831
Posted By tsurko
enabling core dumps for daemon processes
Hello,
I am debugging a program which works as daemon. It sigfaults, unfortunately I'm unable to generate core dump file. Here is what I am doing:

tsurko@bastila:~$ ulimit -c unlimited...
Forum: Programming 05-16-2009
8,562
Posted By tsurko
Not exactly. As it was already mentioned when you...
Not exactly. As it was already mentioned when you compile the program it is "converted" to machine instructions. From this point you can' restore the original source code - it's just not possible....
Forum: Programming 03-10-2009
4,131
Posted By tsurko
You can also include rownum in the select. For...
You can also include rownum in the select. For example:
SELECT rownum, filed1, field2 FROM table WHERE field3='X';
ROWNUM is the number of the row - it is added by Oracle to every query.
Forum: Programming 02-16-2009
1,938
Posted By tsurko
Thank you for your reply. For my needs I think...
Thank you for your reply. For my needs I think that the flowcharts and eventually doxygen will be sufficient.
I've read about the flowcharts in wikipedia (http://en.wikipedia.org/wiki/Flowchart)....
Forum: Programming 02-07-2009
1,938
Posted By tsurko
Specification language suitable for procedural programs
Hello,
I'm wondering what methods and tools are used to describe procedural programs? Is UML suitable for such tasks? I've studied SDL in the university - we used it for specification of...
2,670
Posted By tsurko
Doesn't work on my Ubuntu machine. You can try...
Doesn't work on my Ubuntu machine. You can try something like this in bash:

#!/bin/sh

for i in `seq 1 20000`;
do
istEnabled=1
done
Forum: Programming 01-13-2009
24,536
Posted By tsurko
lagigliaivan, this works, but it won't compile on...
lagigliaivan, this works, but it won't compile on windows I think. Actually I've solved my problem with windows specific functions :(
Many thanks to everyone about the replies!
2,670
Posted By tsurko
Please tell us in what language you are writing....
Please tell us in what language you are writing. This way it's much harder to help you.
But no matter what's the language I think the problem is with the double (()).
3,793
Posted By tsurko
I have something on my mind, but if this is for...
I have something on my mind, but if this is for training purposes there is no profit for you just to solve your problem. Try to workout something alone, post it here and I'm sure that a lot of good...
Forum: Programming 01-07-2009
24,536
Posted By tsurko
Atomic lock file creation
Hello,
I need to implement a locking system in C. My problem is how to make the check if the lock file exist and locking it atomic operation.
I want to make something like this:

FILE*...
3,822
Posted By tsurko
Or just escape the space: mv ABC\ XYZ.TXT...
Or just escape the space:

mv ABC\ XYZ.TXT ABCXYZ.TXT
26,405
Posted By tsurko
I also think this is not possible. Here is a test...
I also think this is not possible. Here is a test on my linux machine:

root@bastila:~/work# cat hello.sh
#!/bin/sh

echo Hello
root@bastila:~/work# chmod 701 hello.sh
root@bastila:~/work# ls...
31,130
Posted By tsurko
Could you show us how you use this code in your...
Could you show us how you use this code in your script? If you want to save it in a variable try something like this:

COUNT=`echo $WORD | grep -oE [[:digit:]] | wc -l`
Forum: BSD 12-12-2008
32,425
Posted By tsurko
Something like that - you can create a virtual...
Something like that - you can create a virtual machine (virtual computer) and install on it whatever OS you want (and is supported) just as you have real PC. VirtualBox is just one solution.
2,167
Posted By tsurko
First of all thank you very much for your...
First of all thank you very much for your answers.
I do apologize for this thread - my mistake. I used another keywords and didn't find what I wanted. This won't happen again.
I know that maybe in...
2,167
Posted By tsurko
First steps in Perl
Hello,
I want to start learning Perl, but I need some expert's advice:) Could you recommend me any online manual or book to start with? I have some experience with bash and C, so I am not a complete...
53,826
Posted By tsurko
Yes, you are right. Your variant is better! I'll...
Yes, you are right. Your variant is better! I'll edit my post.
53,826
Posted By tsurko
SSH sessions from bash script
Hello,
I had to make an ssh connection to remote server from a bash shell script. I've summarized my research and I want to share it with you. I hope it will be useful to somebody or it will get...
2,659
Posted By tsurko
Actually my point was to call script_b from...
Actually my point was to call script_b from script_a. And the code up there was meant for script_a. But of course there is no problem to create new script to call both of them.
2,659
Posted By tsurko
You may try something like this: #!/bin/sh ...
You may try something like this:

#!/bin/sh

# Your code here

#Here you start the script
ssh $SERVER_NAME script_b.sh

#This should also do the job:
ssh $SERVER_NAME <<EOF
script_b.sh
...
Forum: IP Networking 11-19-2008
3,301
Posted By tsurko
I'm not familiar with HP-UX, but can't you use...
I'm not familiar with HP-UX, but can't you use some packet filtering software to achieve this?
2,587
Posted By tsurko
In bash '\' (backslash) is used for escaping...
In bash '\' (backslash) is used for escaping special characters (for example spaces in file names). However I don't know why it's necessary to escape '/' in this case.
Showing results 1 to 25 of 37

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