|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Diff between grep .* file name and grep '.*' filename
Hi, Can anyone let me know what is difference between Code:
grep .* foo.c grep '.*' foo.c I am not able to understand what is exact difference. Thanks in advance Last edited by jim mcnamara; 11-19-2012 at 06:11 PM.. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Looks like a homework question
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
The '*' is not expanded by the shell into filenames. *,? and other characters in the shell are metacharacters, they represent something "beyond" themselves as basic characters - in this case * is a wild card for filenames.
If this is homework post any followups in the homework forum. It has different rules. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [awk] grep a part of filename as entry file | makan | Shell Programming and Scripting | 10 | 09-04-2012 06:04 AM |
| grep exact string from files and write to filename when string present in file | JC_1 | Shell Programming and Scripting | 4 | 08-06-2012 10:52 PM |
| serach diff filename in diff location using shell scripting | Lucky123 | Shell Programming and Scripting | 1 | 11-25-2011 02:44 AM |
| [solved] Diff between two files by grep | feelmyfrd | Shell Programming and Scripting | 12 | 08-03-2010 02:46 AM |
| grep for certain files using a file as input to grep and then move | anita07 | Shell Programming and Scripting | 2 | 12-10-2009 03:59 AM |
|
|