finding funny charaters in a string
Category: UNIX-Unix Beginner
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 ?
code:
cat -vet
this will display all the control characters. ^ and $ represents the start and end of line.
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
try this
code:
egrep '[^]0-9a-za-z:;<>=\?@\[\\\^\_`]'
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
