![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help with awk and arrays | fusionX | Shell Programming and Scripting | 7 | 02-11-2008 06:41 PM |
| awk arrays | imonthejazz | Shell Programming and Scripting | 1 | 09-21-2007 10:29 AM |
| arrays in awk??? | craigsky | Shell Programming and Scripting | 3 | 08-27-2007 10:13 PM |
| KSH and arrays | whited05 | Shell Programming and Scripting | 1 | 06-24-2005 01:07 PM |
| Two or more arrays in Awk | nitin | UNIX for Advanced & Expert Users | 1 | 12-10-2001 09:37 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Ok this is probably pretty easy but I'm stuck.
My program reads the contents of a txt file and stores the string into a char array called buff. The contents of the text file is a string of a txt file name. So basically buff has this value "file.txt\0". The last part is the null character. I want to use buff in an open system call like so: open( buff, O_RDWR ), and the file, "file.txt" will open. But you can obviously see the problem, open() is trying to open "file.txt\0" instead. How can I modify buff so that it isn't looking for the filename with an appended null char on the end? Thanks for reading this. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|