Search Results

Showing results 1 to 40 of 334
Search took 0.03 seconds.
Search: Posts Made By: Aia
Forum: Shell Scripting 14 Days Ago
Replies: 4
Views: 334
Posted By Aia
stat might give you what you want.
Forum: C 17 Days Ago
Replies: 5
Solved: char in c?
Views: 360
Posted By Aia
scanf("%f", &length);
length is an int, you are passing a float. Same with scanf("%f", &breadth);
Either you change the type in the declaration of length and breadth, or change the f to d in the...
Forum: Shell Scripting 20 Days Ago
Replies: 14
Views: 873
Posted By Aia
If you want to continue using awk as the workhorse, then:
ls -l f3.sh | awk '{ if( NF > 7 ) { split($7, a, ":"); print a[1] } }'
Forum: Shell Scripting 21 Days Ago
Replies: 14
Views: 873
Posted By Aia
As you have been shown you can pipe the ls command to another program that further parses the output, in this case awk.
awk can do a lot of things, but even in its simplest form it can be very...
Forum: Shell Scripting 22 Days Ago
Replies: 14
Views: 873
Posted By Aia
Look into the command touch
Forum: Shell Scripting 22 Days Ago
Replies: 11
Views: 959
Posted By Aia
if ( ${cnt} -ge "1" ) That reads if cnt is greater or equal to 1 therefore != would have not worked.

if ($cnt >= 1) then
# whatever you want to mail
endif
Forum: Shell Scripting 23 Days Ago
Replies: 11
Views: 959
Posted By Aia
csh doesn't use if/fi but rather if/endif. Look at posted script and you'll see you have an if/fi.
BTW csh doesn't have the same conditional operators than bash so -ge doesn't work.
Forum: Shell Scripting 27 Days Ago
Replies: 11
Views: 959
Posted By Aia
Post your code the way you wrote it to execute. Make sure there's a space between [ and ]
Forum: Shell Scripting 27 Days Ago
Replies: 5
Views: 603
Posted By Aia
It makes a difference the quotation scheme.
sed "/$npname.*in/d" parts.txt > parts.tmp
Forum: C 34 Days Ago
Replies: 10
Views: 568
Posted By Aia
if( line == pattern)
That's a no-no, since line and pattern are strings and you can't compare arrays in that way.
Take a look at the string function strcmp() for that.
However, even if that would...
Forum: C 34 Days Ago
Replies: 6
Views: 376
Posted By Aia
The controlling expression of a switch shall have integer type.
An array of chars will not do.
Forum: C Oct 25th, 2009
Replies: 6
Views: 225
Posted By Aia
Do you know how to open a file and read from it?
Forum: C Oct 25th, 2009
Replies: 6
Views: 225
Posted By Aia
One step at a time.
Start learning how to assign values to arrays.
Learn how to read a single or group of characters from a file.
After that it is just a matter of parsing what's read and...
Forum: C Oct 13th, 2009
Replies: 16
Views: 347
Posted By Aia
Plenty of thing are erroneous in your snippet, however I would like to point out the cause of your affliction for now.
printf(" A - Addition\n S - Subtraction\n M - Multiplication\n D - Division\n Q...
Forum: C Oct 12th, 2009
Replies: 28
Views: 1,635
Posted By Aia
Funny, I thought that was part of the requirement.
Forum: C Oct 12th, 2009
Replies: 28
Views: 1,635
Posted By Aia
Perhaps another approach?
#include <stdio.h>
#include <ctype.h>

void clean_spaces(void);
int main(void)
{
clean_spaces();
return 0;
}
Forum: C Sep 21st, 2009
Replies: 7
Views: 451
Posted By Aia
Here's an assignment. Search why gets(s[i]); is a no no.

What is it that you are sorting the names by?
Forum: Viruses, Spyware and other Nasties Sep 14th, 2009
Replies: 16
Views: 1,011
Posted By Aia
SKYNET is used as part of rootkit technology which will be hard to clean unless you understand what's going on.
Maybe this thread (http://www.malwarebytes.org/forums/index.php?showtopic=12709) will...
Forum: C Sep 7th, 2009
Replies: 9
Views: 415
Posted By Aia
priyairani00> "program to swap two no. using third variable"
Forum: C Sep 7th, 2009
Replies: 9
Views: 415
Posted By Aia
tmp = a;
a = b;
b = tmp;
Forum: C Aug 23rd, 2009
Replies: 6
Views: 462
Posted By Aia
EvilOrange> <--Line 27 - proving the scanf("%s", &tmpfilename) is working
Dealing with the format %s in scanf() you must pass the argument as plain tmpfilename or as &tmpfilename[0], but not as...
Forum: C Aug 23rd, 2009
Replies: 6
Views: 462
Posted By Aia
On the phone
Nick: Doctor, can you cure my cough? It is a horrible cough, I cannot sleep at night.
Dr. Hell: Sorry, Nick, I cannot prescribe the proper medication without seeing you first, make an...
Forum: Geeks' Lounge Aug 4th, 2009
Replies: 4
Views: 421
Posted By Aia
PetuniaRose> Is there any chance that if and when you have the time, you could tell me how

Copy and paste.
Forum: Geeks' Lounge Aug 4th, 2009
Replies: 4
Views: 421
Posted By Aia
I use that form in conversations when I need to bring focus to a particular portion of the quote. And I use the name from origin so people don't have to follow the linear sequence of the...
Forum: C Aug 4th, 2009
Replies: 15
Solved: Simple IF Loop
Views: 893
Posted By Aia
no1zson> can somebody look at my IF loop (the first one for selcting 1-3) and see where I am going wrong?

I am sure we can guess what you are trying to do, but don't you think it would be more...
Forum: C Aug 2nd, 2009
Replies: 34
Views: 1,240
Posted By Aia
yellowSnow> If this is the case, then perhaps you should try using the strtok() function.
strtok() is a poor designed function, which make this recommendation a poor choice.
Forum: C Aug 2nd, 2009
Replies: 5
Views: 376
Posted By Aia
EvilOrange> string[j][0] = string; <-- HERE IS THE PROBLEM

string[j][0] is a space to hold a character
string, on the other hand, is an array of characters. For sure there's going to be a problem...
Forum: C Jul 9th, 2009
Replies: 16
Views: 877
Posted By Aia
nonadoes> Only need to extract the number after "_C", "_V", "_S" & "_M"
Search for character _ and when you find it skip one more and that's the number you want.
Forum: C Jul 8th, 2009
Replies: 16
Views: 877
Posted By Aia
sscanf() returns EOF if it fails or the number of items that has been successfully read. By using an if statement a minimum of checking has been accommodated. It is imperative to check the return of...
Forum: C Jun 3rd, 2009
Replies: 7
Views: 311
Posted By Aia
You are mistaken.
int printf ( const char * format, ... ); is the prototype. You passed it the proper argument.
Forum: Windows NT / 2000 / XP May 31st, 2009
Replies: 9
Views: 361
Posted By Aia
bugtussellmom> I'm guessing there is some way to destroy them so the data can't be read?
A cheap and easy way of producing satisfactory results, destroying hard drives, is to drill a couple holes...
Forum: C May 31st, 2009
Replies: 5
Solved: File pointers
Views: 531
Posted By Aia
file_name is a pointer already to the first character of the array.
You must omit the & or do it as &file_name[0]

The garbage output probably happens because the string is not terminated with a...
Forum: Windows NT / 2000 / XP May 31st, 2009
Replies: 9
Views: 361
Posted By Aia
For your Dell you need to use the "Reinstallation CD". That would partition your hard drive the way it came first from Dell, and it will install the Operating System it came with the Computer.
...
Forum: Shell Scripting May 27th, 2009
Replies: 4
Views: 1,097
Posted By Aia
blackrobe> Can you please give me an example on how to use the "sed" command in this case??...

I can do better than that, I will give you a link to an easy to understand tutorial...
Forum: C May 21st, 2009
Replies: 15
Solved: Using sprintf
Views: 1,217
Posted By Aia
sanushks> Thanks! atoi works...
Do you know what happens if atoi fails to convert?
Your first choice of using sprintf was superior, since error checking is better with it.
Forum: Geeks' Lounge May 19th, 2009
Replies: 32
Solved: name change
Views: 2,168
Posted By Aia
serkan sendur> you live in USA-welfare country.
It used to be called The Land of Opportunity.
Now, it is more like the camel in the desert, that must survive out of whatever is in the hump. Hoping...
Forum: C May 15th, 2009
Replies: 7
Views: 300
Posted By Aia
lolguy> the removing of the character outside it whish should increment the j to 3 whish should remove E

You are confused. printf("%d",j); is not the subscript used to delete the matched...
Forum: Geeks' Lounge May 13th, 2009
Replies: 32
Solved: name change
Views: 2,168
Posted By Aia
serkan> and i wont feel like foreigner each time i am asked what my name is. it always reminds me that i am a foreigner and causes some sort of alienation.

In a more sober note, I hate to tell you...
Forum: Geeks' Lounge May 13th, 2009
Replies: 32
Solved: name change
Views: 2,168
Posted By Aia
Anything but Joe Dick
Forum: C May 3rd, 2009
Replies: 2
Views: 772
Posted By Aia
>Apparently the return value from gets() differs in some way from the return value of fgets() -- enough to break the code as I've written it.

fgets() reads and include the enter key to the string,...
Showing results 1 to 40 of 334

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC