General :: Can't Quit Terminal Command - Grep Some_word?
Sep 5, 2010
After typing "grep some_word" on terminal 6, the system doesn't do a thing, just lets me type endlessly. I've tried "Esc", "q" , [CTRL] + x, "exit" and no luck. I bet I'll kick my ass when you tell me but at the moment I can't figure it out. Rebooting would probably solve the problem but there must be a better way.
I can't get this simple regular expression to work for matching emails: 'w*(?:.w*)*@w*(?:.w*)*w{2,5}'
It should be working as I have tested it with regex pal and it works just fine. I think there's a problem with optional character class but I'm not sure.
I have installed this but it is command line and i don't know how to quit the thing. Motion is command line. It keeps capturing unless i shutdown the computer. Very frustrating. I also would like help to understand how to configure Motion if someone can fill in the information gaps on this website http://www.chriswpage.com/2009/05/se...04-and-motion/ I have also tried zoneminder but it does not want to run for some reason. I have gone to the zoneminder forum and asked but i don't seem to get very far. They got me to download a zoneminder/ubuntu live cd. I used that but it wasn't seeing the camera. Whereas on the distro i have right now cheese, kamoso so see it. I can live stream with Motion within firefox but i need the motion capturing part configured and without something that will quit Motion the app it's a bit useless. Would appreciate some advice as i have been struggling a long time trying to get this security thing happening
I have a requirement to find the files having its name as ack_reply. However, there are many other files in the same directory as these resides. Now I have to remove these files from the folder and retain others after 7 days. So I tried to write the below script with grep command.
find $directory -type f -mtime +7 | grep ack_reply
how can I pass this output to -exec command.
If I am not using grep command my script would be as
find $directory -type f -mtime +7 -exec remove.sh {}\;;
I am using grep to filter out directories I am not interested in like this:svn stat | grep -v data/charts | grep -v lib/model | grep -v web/picsIt seems a bit "hacky". Is there a better way to specify more than one string to ignore, so that I dont have to chain multiple grep commands?
For searching a file or directory i normally use grep command. kindly can you guide me the difference between grep and find command. I have used both but that are the difference between them ? are the same or grep is new as comapird to find command.
This has to also show the line count. I can get it to show the files but not the line count. What is the single command used to identify only the matching count of all lines within files under the /etc directory that contain the word „HOST? List only the files with matches and suppress any error messages.
When I used the find command, I almost always need to search the local drives. But, I almost always have super large network shares mounted and these are included in the search. Is there an easy way to exclude those in the find command, grep and other similar commands? Example:
I would like to know how to use grep command to filter the log files created between 3:00 PM to 4:30 PM in buch of log for whole day in different headings. This files resembles like sar file in linux.
There are often times when the best way to launch an application is from the terminal, but it is a graphical application and after it is launched the terminal is useless.
Examples of places where a terminal is convenient are when a process starts lots of child processes and is also unstable; you can be sure to kill all of its children simply by using Ctrl-C at the terminal. Also it allows me to read program output and to set up the terminal environment to be optimal for the application (for example "unset LIBGL_ALWAYS_INDIRECT")
With GNU screen, I can get around the hassle of having a terminal window open by using something like the following in a terminal window:
Code: screen my_command Ctrl-A d
and then I can close the terminal and the program will keep running. Then I just type "screen -r <Tab>" (the tab will get me my screen session if there is only one such session) in any terminal window, even a tty, and I can get the screen session back and use Ctrl-c or something.
So my question is, is there a way to do this automatically so that a launcher or script will start a screen session, inside that screen session start a process, and then detach from that screen session without me having to manually open and close a terminal and type the commands?
I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?
Is there any way to get information about whether something is currently played via the speakers? Is there an app that "scans" the VU-meter (e.g. pavumeter) in a terminal and prints out any information about the current "sound-volume" that goes out?I'd like to create a script that prevents my Ubuntu to suspend while something (e.g. music) is played... I know that e.g. Rhythmbox has a plugin for that, but I'd like to use SongBird...
I am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
I want to know that is there any method to grep a particular data from a file without using the "cat --- | grep ' ' " command....I need to use a system call for this functionality.
Is there a way to use the grep command in conjunction with an editor such as nano or vi so that I can remove the commented out lines from a conf file and then proceed to edit it ? I can use grep -v "^#^" squid.conf (example ) which gives me a nicely tidy conf file but I can't edit it.Can this command be used with nano or ?
Code: man -k mail Which lists commands that contain the keyword "mail" in their description.I want the output of this command in less and the words highlighted by grep. Something like
Code: man -k mail | grep mail | less The command doesn't work, how do I fix it?
how to search for those files which contain word "AM_COLLECTION=22". I need to know all the files with this string. ( I know the grep command can do it but either
The thing is that the command for sed resembles the following
[code]...
Now if I want to place another command like grep or cut in the address field how do I do it. Actually I don't know the line number. The user has to give it as an input. How shall I do that?
I want to run a linux command with apache through web browser and that's is not working. and it's working properly when I execute this command through terminal, where is the problem?
NOTE: apache have the privileges to execute the command
I want to pipe the output of a command into grep as the search TERM, rather than the text to be searched, like this for example
Code:
cat /var/log/auth.log | grep date "&b &d"
so that I only see the lines in auth.log for the current day...but obviously that line doesn't work.... is there a way to do this with grep, or even another command?