Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-02-2008, 05:02 AM   #1
Registered: Oct 2007
Posts: 101

Rep: Reputation: 15
Lightbulb bash script to find out more than 1 continuous special characters in a file.

hi all

how to find out more than 1 consecutive occurrence of special characters ("." "-" "_") in string?
for example:

string1 and string4 are incorrect. and string2 and string3 are correct.

Thanks & Regards

Last edited by kkpal; 06-02-2008 at 05:16 AM.
Old 06-02-2008, 05:56 AM   #2
Senior Member
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
grep [\.-_][\.-_]


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
bash command for removing special characters from string kkpal Linux - Newbie 5 05-26-2008 09:14 AM
Use of special characters in .netrc file jlarsen Linux - General 3 08-01-2007 11:12 AM
inserting special characters into mysql with bash script ihopeto Linux - Newbie 1 12-05-2006 01:46 PM
bash and filenames with special characters CoolAJ86 Programming 2 03-09-2005 03:50 PM
how to have no interpretation of special characters (ctrl, tab ...) in a script xround Linux - General 1 11-29-2004 08:21 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration