Search Results

Search: Posts Made By: DNAx86
Forum: Programming 05-11-2008
4,123
Posted By DNAx86
I'm sorry 4 the stupid question, now I remember...
I'm sorry 4 the stupid question, now I remember that exists argc :cool:
Forum: Programming 05-11-2008
4,123
Posted By DNAx86
read arguments from shell
I have to write a C program using sys call (read, no fread) to read from shell all the parameters, without know how many are them.


I tryed in some ways, but I have no success.

Any Idea?
Can...
Forum: Programming 05-10-2008
5
Eof
4,398
Posted By DNAx86
I use a file for inter process comunication. I...
I use a file for inter process comunication.
I insert variables from the start of the.
I remove the variables starting from EOF
Forum: Programming 05-10-2008
5
Eof
4,398
Posted By DNAx86
It does not change anything
It does not change anything
Forum: Programming 05-10-2008
5
Eof
4,398
Posted By DNAx86
If I have 2 EOF witten on a file than I close the...
If I have 2 EOF witten on a file than I close the file.
I re-open it, I seek for the END (SEEK_END), which one of the two EOF are used?

Is it correct to insert an EOF to a file if I use the file...
Forum: Programming 05-10-2008
5
Eof
4,398
Posted By DNAx86
Eof
How can I write EOF into a file?
I tryed to do as follows:

size=sizeof(EOF);
end_of_file=EOF;

write(fdMutexRichieste, &end_of_file, size);

But it does non work correctly,
becouse...
Forum: Programming 05-09-2008
2,786
Posted By DNAx86
Negative Offset
Function: int fcntl(int fd, int cmd, struct flock * lock)

Data Type: struct flock
This structure is used with the fcntl function to describe a file lock. It has these members:

off_t...
Forum: Programming 04-28-2008
3
2,168
Posted By DNAx86
get ip
does exists a system call to get the IP?
Forum: OS X (Apple) 04-27-2008
33,595
Posted By DNAx86
No one can give me an advice?
No one can give me an advice?
Forum: OS X (Apple) 04-25-2008
33,595
Posted By DNAx86
Address family not supported by protocol family
Hi,

I compiled with no error a C program, than I tryed to execute it and than I get this error:

connessione al server fallita: Address family not supported by protocol family


What does it...
3,307
Posted By DNAx86
idem. Maybe I should do anther thing before...
idem.

Maybe I should do anther thing before the if, or I should use another option
3,307
Posted By DNAx86
Empty Files
Hi,

How can I check if a file is empty?

I have read that I could done in this way:
if [ -s sample.txt ]
then
echo "non-zero length file"
fi
But nothing happens
4,956
Posted By DNAx86
YES! It was that i mean, I didn't know how to...
YES!
It was that i mean, I didn't know how to correctly write it.

Thank you shamrock
4,956
Posted By DNAx86
So I have to put 2> after every command? Can...
So I have to put 2> after every command?

Can I redirect all the errors to a file in all the script?
4,956
Posted By DNAx86
I only don't want that appear any errors on the...
I only don't want that appear any errors on the screen.
4,956
Posted By DNAx86
I inserted it in my script, but find still...
I inserted it in my script, but find still procude output errors on the screen and the error-file is empty

find $directory_iniziale -type f | while read file 2>&1 > conta_occorrenze_log.txt
do
...
4,956
Posted By DNAx86
redirection
Hi,

The code below works, it's a part of a bash shell script that serve to search a pattern $pattern_da_cercare in the files contained in a directory $directory_iniziale.

Now the proble is:...
1,818
Posted By DNAx86
variable=9999999999999999999999999999999 What...
variable=9999999999999999999999999999999
What is the max number can I assign?
1,818
Posted By DNAx86
variables
What is the maximum numer of numbers that can be assigned to a variable is a shell script?
1,542
Posted By DNAx86
txt files
How can I know if a file contain text or no?

PS: I have to do a script that search for a pattern in text files
25,064
Posted By DNAx86
I had already tryed, but: It works using it...
I had already tryed, but:
It works using it "stand-alone", for example:
MacBook-di-Mirko:unix mirko$ find /Users/mirko/Unix -type f -name '*.txt'
/Users/mirko/Unix/file.txt...
25,064
Posted By DNAx86
It doen't work correctly. The files with a...
It doen't work correctly.
The files with a space in their names are splitted and the file names are the last words, example:
MacBook-di-Mirko:~ mirko$ sudo ls -laR /Users/mirko/Unix | nawk '/^-/ &&...
25,064
Posted By DNAx86
ls -laR | grep "^-" | awk '{print $9}'| grep "$.txt"
Hi,
I don't know hot to make this command work:
ls -laR | grep "^-" | awk '{print $9}'| grep "$.txt"

It should return the list of file .txt
It's important to search .txt at the end of the line,...
6
for
1,416
Posted By DNAx86
Now that I know how to insert that part of code...
Now that I know how to insert that part of code in a for I understood that it doesn't work correctly.

Example:
MacBook-di-Mirko:unix mirko$ ./test.sh
/Users/mirko/Unix/file.txt...
6
for
1,416
Posted By DNAx86
Can anyone answer me, please?
Can anyone answer me, please?
Showing results 1 to 25 of 67

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