Search Results

Search: Posts Made By: andyj
3,202
Posted By andyj
dont get this question, but it seens trivial
Can you reformulate that question please Myersp, II dont think its clear what you are getting at. I suspect you need/mean telnet.
9,869
Posted By andyj
typical regex problem
This is a bit of a FAQ, worth searching for.

My slant is to advise using regular expressions
Research regexes (regular expressions) for the environment you are using.
In most environments (perl,...
3,016
Posted By andyj
not a fish on a plate
" Geez .... the person can't even ask for some help debugging code that they have ALREADY written ? I don't see what's the problem with helping somebody who is obviously making an attempt to do the...
Forum: Linux 09-12-2003
5,533
Posted By andyj
yes libs can be a problem
I sympathise, installing libraries needed to build an app can be a real headache.

some bits of advice to help you persevere

A common mistake is to install as root and then try compiling as a...
Forum: Programming 09-12-2003
3,760
Posted By andyj
timer/alarm
Heres a good reference on alarms and timers using interrupts:

http://www.gnu.org/manual/glibc-2.0.6/html_node/libc_306.html
49,342
Posted By andyj
method looks faulty
I think I spot 2 general problems with your algorithm

The recursion is greedily depth first, that is, it never unwinds from traversing the first (and only) directory it encounters.

Secondly the...
102,633
Posted By andyj
try this C
$vi nonewlines.c

#include <stdio.h>
/*nonewlines.c - remove nl and cr */
main()
{
int ch;
while((ch = getchar()) != EOF) if ((ch!='\n')&&(ch!='\r')) putchar(ch);
}


cc...
2,084
Posted By andyj
weird permissions
Context: Apache 2.0, Redhat 8.0, Perl 5.80

I am using the follwing line to write a file

open UPLOADFILE, ">$writeto" or errorcantwrite();

which works just fine when the directory permissions...
5,531
Posted By andyj
Contrary to popular beleif it IS possible to...
Contrary to popular beleif it IS possible to recover lost files in Unix - well with a few caveats.....

FIRST STOP!!!! Dont run the machine anymore.
Turn it OFF.

If you need to work or...
Forum: Programming 08-26-2003
3,854
Posted By andyj
The best thing to study if you are really...
The best thing to study if you are really interested in C on UNix is gcc. This is the de-facto standard compiler for Unix. Go to http://www.gnu.org/ and start looking for gcc, in no time you will...
Forum: Programming 08-26-2003
4,773
Posted By andyj
Sounds like you forgot to free() the memory after...
Sounds like you forgot to free() the memory after its used - this is a typical problem, theres a finite amount of RAM and every call to malloc uses up a new area, if you dont use free() to '(un)...
3,546
Posted By andyj
Weakness in Perl CGI causes memory dump ??
I have discovered a curious phenomenon in GCI. I need some advice from someone far more adept. Is this a bug or potential security weakness?

Context: Redhat 8.0 on xx86 (pentium 3) Apache 2.0,...
2,171
Posted By andyj
Similarly a lack of problem context prevents any...
Similarly a lack of problem context prevents any real insight but just at a glance I would say (as a wild conjecture) that the strong quotes are preventing shell expansion of the variable $DATE
...
9,457
Posted By andyj
Java web interface for telnet will be good
Thanks cbkihong. I worked out how to do it but its really very ugly. Your idea of the JavaWeb telnet interface seems like the perfect political compromise and that is the method I am going with.
All...
3,908
Posted By andyj
I see this post is old , i hope you have solved...
I see this post is old , i hope you have solved it by now, but in case jfyi

1) use split to chop your files before ftp (binary)
2) be aware of problems using a windows filesystem with unix...
9,165
Posted By andyj
using head, tail and sed
Heres a little gizmo from my collection, its crude (no param checking) but it works




#!/bin/bash
#linechomp , removes trailing lines from end of file
numlines=`eval "cat $2 | wc -l"`
let...
9,457
Posted By andyj
Wrapping a bash script for CGI
I hope its ok to start a new thread, I was going to use my existing one but thought a new one would better clarify things and provide better search for future reference.

Well I have my bash...
6,855
Posted By andyj
One happy customer has left the store
Thanks guys I've cracked it!

Solution: I made a link to /usr/X11R6/bin/convert

Now im calling that link and everything works fine, must be a paths/environment issue, not sure I'll ever truly...
6,855
Posted By andyj
Must be a typo
I can't see that myself Perderabo, but if I did it was merely a typo which is not in my actual code...prolly getting tired :)

atm I am experimenting with eval
This promises to force variable...
6,855
Posted By andyj
good idea, but I dont think its the one
Thanks Oombera

Still not taking it :(

# which convert
/usr/X11R6/bin/convert

and

# whereis convert
convert: /usr/X11R6/bin/convert /usr/bin/X11/convert

which seem to be aliases of...
6,855
Posted By andyj
The plot thickens
I had an idea to debug this , im breaking it right down to basics

When I execute this from a script in the same directory as the given .jpg file it WORKS


echo I am doing this from a script...
6,855
Posted By andyj
Bash passes flags to shell wrong
Hi, first post, so hello to all.
I have a Bash scripting problem that is driving me a bit nutty.

It involves a program called 'convert' which is part of the ImageMagick collection.
Normal usage...
Showing results 1 to 22 of 22

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