|
| CD4 (28) | |||
when the above program is rum with arguments HOME OR SHELL OR PATH , it gives results. But when OSTYPE is used i gives segmentation fault?? regards | |||
Last edited on | |||
| jsmith (3802) | |
| it returns a null pointer and you aren't checking. | |
| CD4 (28) | |
| i also know that its returning a null pointer.. but why... when i normally give echo $OSTYPE iget back my os?? regards | |
| Seph (2) | ||
| Hello !! It's because echo work on diferent form, I think... You can add these lines to fix this problem in your program: ( The lines in bold ).
| ||
| CD4 (28) | |
| hello seph.. so you mean that otherwise the program is fine.. actually i dint prepare for that NULL because i dint think that OSTYPE wont return a value as it was doing in the console.. Thanks for ur help.. i was great.. :-) regards | |
| writetonsharma (832) | |
| echo itself is a program which takes care of all these things, your program should take care of these errors. | |
This topic is archived - New replies not allowed.
