Search Results

Search: Posts Made By: vlm
Forum: Programming 07-14-2012
2,149
Posted By vlm
read from socket
hello

I have a C program and I want to read data from a socket ,and especially I want a client to send a .jpg to the server.The problem I face is that no matter what the size of the photo is,my...
Forum: Programming 07-07-2012
1,451
Posted By vlm
check substring
hi everyone

I have a C program where I have a line and I want to check if the line contains a string.The line is stored in a buffer.How can I do that?
Can I consider the whole line as a string...
739
Posted By vlm
no it doesn't have to be sed.The only thing is...
no it doesn't have to be sed.The only thing is that is a bash script.
Is this a problem for using perl?
739
Posted By vlm
keep only a string from line
hello everyone

I'm writing a bash script and I have to parse a line that looks as follows:

a/ b:4 word=egg things.?/things2//

no matter what other words or characters exist in the line,I...
Forum: Programming 06-14-2012
2,519
Posted By vlm
That's strange because not only compiles fine but...
That's strange because not only compiles fine but works as well...
So if I want to pass the whole array I have to do it the way I said before?
Forum: Programming 06-14-2012
2,519
Posted By vlm
Actually I changed the a[i] to &a[i] and works...
Actually I changed the a[i] to &a[i]
and works fine.
One more question,if I want to send in a function not only one element:
&a[i]
but all of them do I simply do:

funct(a);//a is the void**
...
Forum: Programming 06-13-2012
2,519
Posted By vlm
The thing is that when I try to refer to one...
The thing is that when I try to refer to one element of the array,that means to one void* it doesn't work.
For example when I had:

main(){
void* a;
fun(&a); //call a function named fun...
Forum: Programming 06-13-2012
2,519
Posted By vlm
I want to have n void*. But n is an argument to...
I want to have n void*.
But n is an argument to the function,that's why I thought it would be better if I had an array of void*
Forum: Programming 06-13-2012
2,519
Posted By vlm
void pointer
hi guys!

Is there such a thing as double void pointer dynamic allocation?
And if so is it something like this?

int n;
void** a;
a=malloc(n*sizeof(void*));
659
Posted By vlm
Ok for the case snsitive but also I have http and...
Ok for the case snsitive but also I have http and I want https ..
any ideas for that?
659
Posted By vlm
bash many patterns
hi guys

in my bash script I call wget to check for valid links like this:

wget -q "$1" -O- | grep -ow "href=\"http://[^\"]*\"" | sed -e 's/href=//g' -e 's/"//g'


but this only finds the...
9,091
Posted By vlm
1)yes the files are sorted 2)no the output...
1)yes the files are sorted

2)no the output order is not at all important

3)lines appear either once or twice

4)that's not known..some files have 500 lines or more and some 4...

I found...
9,091
Posted By vlm
bash keep only duplicate lines in file
hello all

in my bash script I have a file and I only want to keep the lines that appear twice in the file.Is there a way to do this?
thanks in advance!
889
Posted By vlm
bash keep a word from a line
hi guys

in my bash script I have a file which has lines that look the following way:

dog cat "bird" red/ [green] (blue/pink)

OR

dog cat "bird" red/ [green/green] (blue/pink)

no matter...
Forum: Programming 06-07-2012
869
Posted By vlm
double pointer allocation
hi guys

how can I allocate a double char pointer?
I want an array of pointers to char[] objects.

the objects the double pointer points to are :


char b[1024];
2,255
Posted By vlm
Could you give me an example?
Could you give me an example?
2,255
Posted By vlm
bash ascii
hi guys
In my bash script I need to use ascii characters such as SYN(22) and US(31).
How do I echo them?
Forum: Programming 06-06-2012
2,686
Posted By vlm
I have a main parent code that collects data from...
I have a main parent code that collects data from every process it forks and then prints all of the data to a file.a child starts collecting data only when receiving a message.Otherwise waits.
The...
Forum: Programming 06-05-2012
2,686
Posted By vlm
The parent process sends a string message to the...
The parent process sends a string message to the children in order to do some things.When a child is finished waits for the next string message.Only one child can deal with each message but there's a...
Forum: Programming 06-05-2012
2,686
Posted By vlm
I see.So if I understood correctly the parent has...
I see.So if I understood correctly the parent has a pipe for each of its children and depending on what child it wants to wake up writes to that pipe right?
But how does the parent know which...
Forum: Programming 06-05-2012
2,686
Posted By vlm
So in that case the parent doesn't have to use...
So in that case the parent doesn't have to use the wait-status at all right?
(I forgot to mention that when the parent wants all of its children to terminate it sends a certain signal..)
Forum: Programming 06-04-2012
2,686
Posted By vlm
Wait status
hi all!

In my C++ program I have a parent process which forks 5 children processes.The processes do a job and then they have to do some sort of sleeping(not terminate) until the parent wakes them...
Forum: Programming 06-02-2012
1,708
Posted By vlm
Hash string
Hello everyone!

I'm writing a C++ program and I use a hash table which contains strings.
Its the first time I have to deal with strings since the only thing I have done so far is for integers and...
2,266
Posted By vlm
you mean something like this: awk...
you mean something like this:


awk -F["\(\)"]


because it's not working and I assume there's syntax error

---------- Post updated at 11:45 AM ---------- Previous update was at 09:40 AM...
2,266
Posted By vlm
Great!Thanks a lot everybody! ----------...
Great!Thanks a lot everybody!

---------- Post updated at 08:43 AM ---------- Previous update was at 06:26 AM ----------

I was wondering what if the required field is not inside "" but inside...
Showing results 1 to 25 of 61

 

Featured Tech Videos

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