2
votes
2answers
103 views

How do I check that a filename conforms to a pattern?

I'm tasked with writing a shell script which checks that a filename conforms to a specific pattern and I'm not sure how to go about it. The filename should follow a pattern which looks like: ...
3
votes
2answers
177 views

How to find frequency of occurrences of strings contained in a file?

I have a file that contains a list of URLs of the form EDIT http://www.google.com/absd/siidfs/kfd837382$%^$&, www.google.com, google.com yahoo.com/list/page/jhfjkshdjf... I ...
5
votes
2answers
112 views

Modifying zsh globbing patterns to use with cp

I'm trying to write a script to copy files recursively from a particular folder except files A.extn, B/*.extn and C/* where B and C are directories and extn is just some generic extension. This is ...
1
vote
2answers
765 views

Pattern matching exception for shell script

So I have the following shell script for batch renaming the episodes of some given TV series: #!/bin/bash #script for renaming files of form "*01*.ext" to "Episode 01.ext"; counter=0 for all_files in ...