![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| 'end of file' unexpected | srisreeku | Shell Programming and Scripting | 1 | 04-28-2008 02:39 PM |
| end of file unexpected | naveeng.81 | Shell Programming and Scripting | 1 | 03-11-2008 06:43 AM |
| unexpected end of file | dineshr85 | Shell Programming and Scripting | 2 | 10-15-2007 02:47 AM |
| gunzip: unexpected end of file | sicjedi | UNIX for Advanced & Expert Users | 4 | 09-15-2006 10:41 AM |
| 'end of file' unexpected | abhijeetkul | Shell Programming and Scripting | 4 | 04-10-2006 06:42 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
unexpected 'end of file' + sed command
hello,
i use this command in my code: (void) sprintf ( LBuf, "/bin/sed 's/\\[//g;s\//]//g' %s > %s", tmp1,tmp2); but i get this error : sh: syntax error at line 1:'end of file' unexpected any help please thank you |
|
||||
|
The C compiler munges \ characters, so writing a command line like this can be a problem. Print LBuf to a file,
Code:
chmod +x that_file that_file You can also use a command that does not use a lot of metacharacters: Code:
sprintf(LBuf, "/bin/tr -d '[' < %s | tr -d ']' > %s", tmp1, tmp2);' |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|