Hi all,
when I do a "grep JERRY *.h" nothing is returned which is what I expect. This is in my source directory... when I do a "grep JERRY *" every file is returned an a line printed even though there is no JERRY on the line. Then if I do a "grep JERRY *.c" just the 4 lines that have JERRY are returned.
This is what is prints for "grep JERRY *"
src# grep JERRY * | more grep: JERRY: No such file or directory access_manager_help.htm:<FONT COLOR="#CCCCCC"> </FONT>
so why is is skipping JERRY as the search item? The name JERRY is not the problem I can do this with any name and the same happens when searching all file "*".
Thanks,
Jerry
Jerry Geis wrote:
Hi all,
when I do a "grep JERRY *.h" nothing is returned which is what I expect. This is in my source directory... when I do a "grep JERRY *" every file is returned an a line printed even though there is no JERRY on the line. Then if I do a "grep JERRY *.c" just the 4 lines that have JERRY are returned.
Do you have a file name that starts with a "-" in your directory?
Mogens
Jerry Geis wrote:
/ Hi all,
/>/ />/ when I do a "grep JERRY *.h" nothing is returned which is what I expect. />/ This is in my source directory... />/ when I do a "grep JERRY *" every file is returned an a line printed even />/ though there is no JERRY on the line. />/ Then if I do a "grep JERRY *.c" just the 4 lines that have JERRY are />/ returned. / Do you have a file name that starts with a "-" in your directory?
Mogens
Yes I do actually. There is a -f filename of which I dont need.
I tried rm *f and it is not removing it. No what?
Jerry
On Fri, May 16, 2008 at 9:18 AM, Jerry Geis geisj@pagestation.com wrote:
Somehow the VIM start screen is in the -f file... Not sure how that happened but glad its gone.
What do you mean? When you type "vim" on the terminal it tries to open the file named "-f"?
If that's the case, check the ".viminfo" file in your home directory. It saves the state of the last vim session and re-opens it when you execute vim again. Maybe you still have a reference to the offending file there.
HTH, Filipe
In article 482D8875.1050709@pagestation.com, Jerry Geis geisj@pagestation.com wrote:
Do you have a file name that starts with a "-" in your directory?
Mogens
Yes I do actually. There is a -f filename of which I dont need.
I tried rm *f and it is not removing it. No what?
Ouch! That may well have deleted any other files with a name ending in f, while leaving the file -f still there!
[tony@softins tmp]$ touch ./-f ae af ag be bf bg [tony@softins tmp]$ ls -f ae af ag be bf bg [tony@softins tmp]$ echo *f -f af bf [tony@softins tmp]$ rm *f [tony@softins tmp]$ ls -f ae ag be bg
Easiest way to remove the file -f is: rm ./-f
Cheers Tony