10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to write a K shell script to find full file names , line numbers and lines which have words meeting either of following 2 criterias -
1)words which are 6 to 8 character long and alphanumeric.
2)Minimum 8 characters, one upper case, one lower case letter, one of the special characters... (1 Reply)
Discussion started by: Rajpreet1985
2. Shell Programming and Scripting
what elements does " /^/ " match?
I did the test which indicates that it matches single lowercase character like 'a','b' etc. and '1','2' etc.
But I really confused with that. Because, "/^abc/" matches strings like "abcedf" or "abcddddee".
So, what does caret ^ really mean?
Any response... (2 Replies)
Discussion started by: DavidHe
3. Shell Programming and Scripting
$word = "one last challenge";
if ( $word =~ /^(\w+).*\s(\w+)$/ )
The output shows that "$1" is with result one and "$2" is with result challenge. I am confused about how this pattern match expression works step by step. I... (8 Replies)
Discussion started by: DavidHe
4. UNIX for Dummies Questions & Answers
In regular expressions with grep(or egrep), ^ works if we want something in starting of line..but what if we write ^^^ or ^ for pattern matching??..Hope u all r familiar with regular expressions for pattern matching.. (1 Reply)
Discussion started by: aadi_uni
5. UNIX for Advanced & Expert Users
I have a flat file with the following drug names
Nutropin AQ 20mg PEN Cart 2ml
Norditropin Cart 15mg/1.5ml
I have to extract digits that are before mg i.e 20 and 15 ; how to do this using regular expressions
ram (1 Reply)
Discussion started by: ramky79
6. UNIX for Dummies Questions & Answers
I am have a configuration script that my shell script uses. There is a regular expression defined for the input file. How do execute the shell script and pass the name of the input file using a regular expression.
I would greatly appreciate some help. If you could point my to a website that... (1 Reply)
Discussion started by: supergirl3954
7. UNIX for Dummies Questions & Answers
I need help with regular expressions. I want to create a regular expression which will take only alpha-numeric characters for 7 characters long and will throw out an error if longer than that.
i tried various combinations but couldn't get it, please help me how to get it guys.
... (2 Replies)
Discussion started by: ragha81
8. Shell Programming and Scripting
I have following content in the file
I am trying to use following matching extression
to get this
Obviously it does not work.
Any ideas? (13 Replies)
Discussion started by: arushunter
9. Shell Programming and Scripting
How can i create a regular expression which can detect a new line charcter followed by a special character say * and replace these both by a string of zero length?
Input File san.txt
hi ... (6 Replies)
Discussion started by: sandeep_hi
10. Shell Programming and Scripting
i cant get around using regular expressions in if/else statements. it simply doesnt give me the right results.
i've tried using switch/case but that is just as sh!tty as well. (pardon my french but im getting frustrated with c shell..only reason why im writing in it is because it's a hwk... (3 Replies)
Discussion started by: ballazrus