General :: Simulate Ack By Using Grep With The Right Combination Of Options?
Aug 25, 2011
I have ack-grep installed on my local machine, and find it indispensable for quickly 'acking' through a codebase when debugging. However, on my cheap shared hosting, there is no ack-grep. One of the testimonials on betterthangrep.com mentions a
Rube Goldberg mess of find/grep/xargs which sounds like what I need, but coming from the opposite direction.
regex in grep? I need to match ANYTHING in the following with any character combination (something like * in findstr in C): grep "Delivery of nonspam" /var/log/mail.log | grep "to [URL]"
I have a keyboard with two faulty buttons, and I don't want to through away my keyboard just for two buttons.I have linux and windows, In DOS and Windows I somehow managed to get away with this problem by typing Alt+65 (for letter 'A') and so on.and in Linux while in GUI I take use of on screen keyboard. But problem starts with when I work in run level 3.
Computer is Gateway Netbook with Win7. I want to install Ubuntu ,but when I go to the next window after the keyboard section, I cannot find the right combination for the partition designation. I click install on a 50gb partition I made for the install. The page asks for mount points and says no root file system is defined. I put in EXT2 and a / , page told me I should have a section for a swap file. what is the correct information for these boxes? I am installing Ubuntu to learn the linux sys and I certainly don't know inough about it to come up with these commands yet.
I'm running Eclipse on a Linux server and I'm displaying it locally through xwindow forwarding using xming.Whenever I create something like a subwindow (like opening project properties or the Project Explorer when when pulled out of the main window), these windows are not resizable. When running natively on Linux, the resize is possible without a problem.
i was trying to figure out a way to write my own linux commands.. in fact i wanted to write a shell script to simulate an already existed linux commands like 'cd','ls' and'adduser'i just dont know the language of scriptting and even doesnt know the steps to make a script
So I have the burned ubuntu CD, and I'm attempting to install it on a system that has one HDD with XP/Vista on it, and another that is completely formatted and unpartitioned. However, when I boot to the ubuntu CD, I can use the menus from the bottom, and select the language when initially prompted, but I can't select any of the menu options except for boot from first hard drive.
How to get rid of the following error I've been receiving from Yum. I'm fairly new to Fedora. The following message appears when Add/Remove Software is launched. It also pops up periodically in the notification window.
could not do simulate: Traceback (most recent call last): File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 3270, in __init__ self.repos.confirm_func = self._repo_gpg_confirm File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 823, in <lambda> repos = property(fget=lambda self: self._getRepos(), File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 551, in _getRepos prerepoconf = self.prerepoconf AttributeError: 'PackageKitYumBase' object has no attribute 'prerepoconf'
I wrote software which access and reads a serial device. I would like to test this software on my computer without loop-wiring or without a second computer.
How could I use pty's to simulate a serial device?
Actually I would like to temporary replace the /dev/ttyS1 file by one end of the pty. How could I do this? Is there a command to create a pty pair?
I use Ubuntu through Wubi, and none of the key combinations in the Wubi Guide ever do anything...I don't have a SYSRQ key on my laptop so I can't even do most of them
how do I safely reboot Ubuntu when it freezes (which is often)? Trying to be proactive.
I would like do add a new keyboard key combination for a function like Alt + F4. for example shift + control + s. Up to now, i was successful with exchanging the function Alt + F4. But I don't like to exchange, because I need Alt + f4 and shift + control + s for the function close window at the same time.
So how can I add a new keyboard combination without to exchange?
Classic and Unity modes.ALT+F2 combination does not work on 11.04. Could not fix minimize, maximize, close buttons. I tried metacity --replace and from gconf-editor.
Today, i checking my error log of Apache. I have look many IP brute scan URLo, i collect, export that to ip.txt and i need grep IP with connection >=8I don't know command to solve that. Example ip.txtQuote:
I searched and I found a few threads on this but none answered my question really.I'm using:
Code: curl www.foo.com | grep '<h2>.*.</h2>' Basically I want to extract all instances of Code: <h2>Blah blah blah</h2>
from the page source, but it's not giving me that, it gives me <h2>.. followed by a loads of other stuff that I don't want. I haven't used wildcards with grep before so I don't really know whether I'm doing it right or not.
When I drink tea, the water splashed on my keyboard. It didn't cause any problems until a few mins ago. Now my Enter and right hand side shift key don't function any more (The new line in this text is copied from other thread).
So I would like to know how can I simulate an enter key press so that e.g. a command can be executed in terminal. Because I have some source code uncommitted, I want them at least get committed first.
I'm trying to save the output of the script I wanna run but for some reason I cant manage to do it with "script.sh > Output_4.txt"
The thing is that the script was already run and it extracted some directories so when I try to run it again (to save the log to a Output_4.txt) bash says (see screen-capture) and of course the log's empty!!!!
For backup and pre-functionality purposes, I need to simulate a VirtualHost in my Fedora (14) machine. I found some interesting links to carry out that process but with an IP fix.So, how can I simulate a VH through a localhost with a dynamic IP?