![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove trailing G | Heathe_Kyle | Shell Programming and Scripting | 3 | 04-14-2008 11:56 AM |
| shortcut for tar cvf - [filename] | gzip > [filename].tar.gz | bcamp1973 | UNIX for Dummies Questions & Answers | 4 | 12-11-2007 05:45 PM |
| ~mark | henk | Shell Programming and Scripting | 1 | 04-23-2006 10:12 AM |
| ? question mark, how to get back to the root directory | etravels | UNIX for Dummies Questions & Answers | 1 | 02-05-2004 06:14 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
trailing question mark in filename
I have a script(ex.sh) with one line in it, running in bash shell.
ls -l > /usr/ngasi/contexts/tdevoe/private/ex.txt when I run it , it creates the file with a trailing question mark -rwx------ 1 tdevoe webapp 59 Jun 7 06:42 ex.sh -rw------- 1 tdevoe webapp 3761 Jun 7 06:42 ex.txt? why? |
|
||||
|
I think you've got gremlins.
![]() "Gremlin" is a colorful term for strange, nonprinting characters that your text editor might not show you but can really foul things up anyway. That's not a literal question mark, it's ls thinking "What the hell is that? I can't print that!" so it just prints a question mark instead. Gremlin characters are even more annoying in C files, the compiler just dies. I often get lots of gremlins from copy/pasting stuff from the internet. If that's how you ended up with that one, there's probably lots more. You can get rid of gremlins like: Code:
tr -d '[\000-\010\014\016-\037\177]' < messed-up.sh > fixed.sh P.S. Don't feed them |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|