![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| finding string at runtime | inderpunj | Shell Programming and Scripting | 1 | 05-01-2008 12:19 AM |
| While finding compare the result with given string | mr_bold | UNIX for Dummies Questions & Answers | 4 | 04-24-2008 06:31 PM |
| finding a string in a file | Ume1986 | UNIX for Advanced & Expert Users | 2 | 01-24-2008 04:19 AM |
| help with finding a string | sandyg | Shell Programming and Scripting | 2 | 09-28-2007 07:15 AM |
| Finding part of a string | DAFNIX | Shell Programming and Scripting | 4 | 09-20-2006 08:24 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Finding funny charaters in a string
Hi,
I have got a little problem where some of the files I created had some funny characters e.g space ,"^M" etc inserted in the full file name and which caused our backup script to skip those files. Is it possible to find out if there are any funny charaters in a string ? Thanks, |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Code:
cat -vet <filename> |
|
#3
|
|||
|
|||
|
Mona,
Thanks for that and also could you please advise code in finding characters other than ASCII from a string e.g between chr(49) and chr(122). Thanks |
|
#4
|
||||
|
||||
|
Try this
Code:
egrep '[^]0-9a-zA-Z:;<>=\?@\[\\\^\_`]' <filename> |
|
#5
|
|||
|
|||
|
Mona,
Thanks for that. Could we include "/" as legitmate part of the string, as I am using full path name for the files. Best regards |
|||
| Google The UNIX and Linux Forums |