Help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help
# 1  
Old 01-21-2005
Question Help

can any body tell me what the following code is doing.....


ls | grep '?*cw1' | wc -l

i'll b thankful if any body could help me
Smilie
# 2  
Old 01-21-2005
ls - is listing the contents of the present working directory. Its output is piped to the command
grep '?*cw1' which is searching for files that have the name that fits the pattern ?*cw1. The output of this is piped to wc -l which lists a count of the number of files with this name. ?* are regular expressions (wild cards). ? matches any 1 character and the * matches any number of characters after the ? up to the cw1 string

Last edited by google; 01-21-2005 at 08:41 PM..
# 3  
Old 01-23-2005
thanx vry much mate....
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question