No, unless that file is a pipe (ls -l output would start with aQuote:> Hi, I'm grepping for a pattern (GNU/Linux, BASH 2.05) in a log file
> that's open by a process. When I run grep on this file, grep doesn't
> exit and I suspect it's because the file is open by a process and grep
> is waiting for further input.
> Is my assumption right?
If it's not a fifo, try to find out what grep is doing.
Running
strace -p $(pidof grep)
when grep is stuck may give some information.
--
Stphane
Ed.
> You're probably wrong. Check that the file exists, check that you're
> quoting your variables properly, and if that doesn't fix it, post back
> here and show the actual command you used.
> Ed.
1. grep attempts to grep in non-ascii files
This is an area where I with that the "file" command were a bit more
robust. It does a good job of identifying the type of file it is examining,
but it doesn't provide it's feedback in a machine-friendly format. What
would be nice is if there were an option that would output a two-digit
value for the type of file that is being examined - that a shell script
could examine the value and decide whether certain operations should be
performed or not.
2. Need Graphics Driver for SBT Velocity 128 AGP card for SCO 5.04
3. OpenWin Filemgr: 'cannot open file: too many files open' ?
4. __argz_count ... What library is this in?
5. Help: What controls number of files a user can open (file open command)?
6. Q: Linux, XFree2.1, XF86_Mono, Sigma LaserView, black screen
7. Open File Manager (open file backup) for Linux?
8. NET-2 configuration files, new hostname failure
9. grep sTerm * | grep -v grep ???
11. How do I grep a file and move found files to a directory?
12. Parse file names for string and then grep these files ??