Ubuntu :: Grep Script That Finds Searched Keyword
May 16, 2010
I need to write a script that can search up to 3 parameters and find all files containing those words. then display them and the amount of hits it got.if the first parameter exists, then we can assume we are looking for the word supplied.if the second parameter exists, then we are looking for files with both keywords.if third parameter exists test the second parameter for the values ('and', 'or', '-v') and search accordingly. These are the only values accepted as the the second one when 3 parameters are present.
lastly, if there are zero or more than three parameters echo as an error and when 3 parameters have been entered we echo an error when the second parameter is not one of the following: 'and', 'or', '-v'.
View 1 Replies
ADVERTISEMENT
Dec 5, 2010
im using
Code:
scons prefix=/usr qtdir=/opt/qt4
to configure and i get these compilation errors
Code:
scons prefix=/usr qtdir=/opt/qt4
scons: Reading SConscript files ...
Platform: Linux i686
scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead.
File "/mixxx-1.7.2/SConstruct", line 42, in <module>
WE ARE IN: /mixxx-1.7.2/linux_build
QT path: /opt/qt4
Loading qt4 tool...
[code]...
ive been scratching my head at this one for days, i turned on the ubuntu virtual machine and checked what apt wanted to pull, and im suspecting that i need to find the source versions of several packages in regard to qt4 and libqt4 and various libqt4 extensions.
View 4 Replies
View Related
Apr 12, 2010
Installed azureus vuze from the terminal. Im not thrilled with it and want to remove it.I used the comand sudo apt-get remove azureus and Code: sudo apt-get remove vuze it then listed a buch of files no longer needed so I erased them as well. The program is still there and operational. I tried the above again and it says that they dont exsist. I even looked for them in synaptic and the software center with no luck but I expected that. What am I missing?
View 1 Replies
View Related
May 15, 2011
I've been through what I could find in searches here, but nothing fixed the problem so far.Here's the situation: I am using Ubuntu Natty 11.04, dual booting. So I know the sound is fine on the XP system, and also works crisp and clear on my Vista laptop sitting next to me. I've tried the sound through Banshee, Amarok and Exaile all with the same crackling as if the file was ripped off a bad CD. I'll repeat that I've tested the speakers, and also the jack port (being that there are two on my PC) so I am fairly certain it is an issue with Ubuntu. Here is the ALSA information report: http://www.alsa-project.org/db/?f=ad...8b8d1ee19905a5
It's not a problem with PCM- the crackling will go away if the level on PCM is like 30~ but then the sound is very quiet even with Master and speaker volume at 100, at which point you can still make out the crackling.
View 9 Replies
View Related
Feb 8, 2010
I am having problems making wireless work on my pc. I have searched the forums and tried several things (b43-fwcutter, among others) and I cannot get anything to work. My computer is an HP ze4900, broadcom wireless Quote:
*-network:1 UNCLAIMED
description: Network controller
product: BCM4306 802.11b/g Wireless LAN Controller
[code]....
View 1 Replies
View Related
Nov 22, 2010
I need to kind of grep within grep. My input file would be something like:
[Code]....
and I need to find the first occurrence of hello before MY PATTERN (hello 9008 in this case), so the output should be:
[Code]....
View 4 Replies
View Related
Mar 17, 2011
This used to work by default in previous versions of FF.
imdb $movie
wiki $some_topic
now they don't.
My personal favorite was
man $page
Open about:config and search for keyword.URL - it should be blank. Double-click to edit and enter
Code:
[URL] This will restore the previous Firefox keyword search behavior. No restart necessary.
View 2 Replies
View Related
Jul 10, 2011
I've set up a sandisk usb stick to boot/install 11.04. On two eepc netbooks I get the same issue when I try to boot from the usb: SYSLINUX 3.63 Debian 2008-07-15 EBIOS Copyright 1994-2008 H Peter Anvin Unknown keyword in the configuration file
View 3 Replies
View Related
Jan 12, 2011
recently got this message when USB booting:Unknown keyword in configuration file: gfxbootI used to have the "Unknown keyword in configuration file: ui" problem, which was spread throughout the forum. I know people have fixed it by removing the "ui" in the config file. This is what I did in /syslinux/syslinux.cfg
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
[code]....
View 3 Replies
View Related
Mar 24, 2011
I have a multiple txt file in one folder. I would like to remove everything from starting until find string keyword in one folder. Here is the sample of my text:
Code:
5a651a62sf1a54f2a1sf6a4f50a5f4a2f1a2d1sfs11231211f61d021sd1fs1Reassembles21f2sdf122dfs21fs212sdfdsf1s65f1s62f1
So i want to remove everything from starting until reassemble. Here is the sample output:
Code:
s21f2sdf122dfs21fs212sdfdsf1s65f1s62f1
I have multiple file in one folder. So how to use any script to read in one directory folder and do a same task. I prefer using awk, sed or perl.
View 5 Replies
View Related
Apr 15, 2010
I am using latest GCC version GCC4.4 in my linux. my code snippet:
auto const char *ostr = ((int *)node)->str;
When i compile this, i get an error as follows:
error: auto will change meaning in C++0x;
View 13 Replies
View Related
Apr 21, 2011
I want to list all installed packages by keyword. For example I want to know what packages were installed related to "game". How can I do that in Fedora?
I tried 'yum list installed', 'you search' ... but still can't find a solution. I'm not a yum expert .
View 2 Replies
View Related
Apr 10, 2011
I have a file and at some point in the file the string "DONE" appears (it's unambiguous). I want to redirect all that is coming starting from the next line to a new file. How do I do that?
View 6 Replies
View Related
Mar 19, 2010
I'm working on RHEL5 dealing with AS (ActionScript) files in Linux GVIM Editor but everything is in blue color. Can i set color coding for my keywords?
View 3 Replies
View Related
Oct 17, 2009
The owners manual of my monitor gives me the following informations:
When editing my xorg.conf, do I have to add the automatically 'keyword' ? (saw nothing about it in man xorg.conf or man nv)
View 6 Replies
View Related
Oct 25, 2010
I'm having problems installing Ubuntu 10.10 Netbook onto my Asus 900. I downloaded the .iso then used the "make startup disc" feature in my Mint 9 desktop machine to make a usb install disk. All appears well at that point. When I try to boot from the usb stick, I get an error message as follows:
"SYSLINUX 363 Debien-2008-07-15 ......
Unknown Keyword in Configuration File
boot: "
and the cursor just hangs there and doesn't respond to the keyboard.
I also tried it on another Asus and a Gateway Laptop with the same results.
My intention is to have this the sole OS on my little Asus 900.
View 4 Replies
View Related
Sep 22, 2010
got a whole lot of video files spread among 100's of folders, wondering if Linux has a program that can scan the modification and view dates of them all, and just display what's been accessed most recently.
View 4 Replies
View Related
May 5, 2011
I've got problem with Avahi on my laptop. It can see the other machines and services on the LAN but not it's own local services and I have no idea why. The laptop (hostname: forseti) sports Ubuntu 10.10, installed aavahi-daemon, avahi-dnsconfd and libapache2-mod-dnssd. Firewall is disabled. Other hosts on the LAN are: magni (openSuSE 11.4 with lots of services published and visible from forseti) and freya (Ubuntu 10.10 with gnome-user-share up & running). Forseti can see the other hosts and their services but not itself. The other hosts can't see forseti. Checked both with nautilus and CLI's avahi-browse.
View 1 Replies
View Related
Jul 31, 2011
I ran grub-customiser to set default kernel, and saw the GFX mode setting, thinking "Hey, my monitor is native at 1440x900! I'll use that!" ...Didn't think about how the GFX card isn't initialized at that point, so my res is limited to 640x480... So the first problem was a system hang at the grub menu, with "Input Not Supported" displayed on the monitor.I changed the GFX mode back, and ran update-grub, and with a grin on my face, I rebooted. The grin went away fast, when I saw that none of the kernels showed in the grub menu, and I have only the two memtest entries. It appears that, while all the files are still intact, grub is not seeing the kernels. I had an idle partition of about 13 GB on hand, so after trying all sorts of things, I did a clean install on the little 13 GB partition. Still no dice, after doing an apt-get purge grub etc etc etc on my main Ubuntu partition, to make sure that the new grub was running. I still have only memtest, even though I can open the /boot directory and see the kernel files. I tried going into the grub command line and starting manually, but tab-complete does not suggest any of the kernel files, and tells me that the files do not exist, if I type in their full names.
View 6 Replies
View Related
Jan 4, 2010
i need an application or shell script that can identify all the directories and files in a certain directory and can rename them to remove any spaces in the filenames.anyone know of anything that can do this?
View 9 Replies
View Related
Jun 6, 2010
Ive installed 10.04 on my laptop and notebook. It works perfectly on laptop. On notebook the problem is it finds no Wireless network and just says disconnected. I have no idea how to connect it, I tried reinstalling Ubuntu but no luck. I tried looking it up on internet but no luck in finding help. its an MSI U130. The wireless is defently turned on.
View 7 Replies
View Related
Oct 1, 2010
Would like to use Ubuntu Tweak on 10.10 beta. Is it safe to remove everything that its cleaning section finds? Or do I have to look carefully at what it removes? Can I just let it remove everything it finds and not worry that something I have installed will be affected?
View 2 Replies
View Related
Dec 4, 2010
I've installed ubuntu on my laptop, but I've got one problem... I can't see my wireless Internet?
On my mac I see my wireless Internet i click on it, put the password in and I'm connected, but on my ubuntu he doesn't show the wireless Internet?
When i connect via cable I've got Internet so i think it can't be my network card because else he wouldn't connect via cable not?
View 9 Replies
View Related
Jan 15, 2011
I accidentally permanently deleted a few files and I was wondering if there was a program that finds the files that were deleted and restores them?
View 4 Replies
View Related
Mar 4, 2011
ClamAV tells me that three of my OpenOffice.org Calc spreadsheets may be infected (status "MBL_144360.UNOFFICIAL", if that means anything). This seems not entirely implausible, since yesterday I used a USB stick to transfer files from a Windows system. Anyway, I'd really like to keep these spreadsheets. Can I disinfect them somehow?
View 2 Replies
View Related
May 20, 2011
So I was the one who couldn't get their ethernet port to function properly. Most likely, this was the result of bad hardware since none of the community's suggestions for software fixes did anything. I believe this is probably true.Indeed, when I bought a cheap $10 wireless USB dongle, it immediately worked better than all the previous things. It detected networks, displayed network strength and even allowed me to attempt login.
The only problem now seems to be that it cannot login. I've rechecked the password countless times, but it just shows the 'connecting to wireless' animation for a minute or two and then poops out and says, 'disconnected'.I assume if everything is getting me this far, the driver is not the problem with the device. Is this a safe assumption?
View 2 Replies
View Related
Oct 27, 2010
I am trying to use sed to replace a bunch of text in several hundred files, so I have this bash script that should iterate through all my files. It looks like this:
#! /bin/sh
for php in *.php; do
./run.sed $php
[code]...
View 10 Replies
View Related
Mar 9, 2010
I'm running a syslog server on ubuntu 7.04. Can I somehow have it email me if it finds a certain thing in the log? For example. I'm running a PRI and when the PRI goes down, it logs a "DEACTIVED" in the log. I would like an email telling me this so I know to get on it and fix it.
View 9 Replies
View Related
Jan 19, 2011
can I index files so whenever I do a find somethingdo find / -name libSDL-1.2.so.0It doesn't take 10 mins. I do know there are packages such as tracker but that one does indexing all the time. I would be happy to have something which can be done by hand or something which is done once in 12 hours or so.
View 2 Replies
View Related
Nov 14, 2015
I am running Wheezy 7.9 (32 bit) and using Gnome Classic desktop. I have recently had several issues with system "crashes" and such, see some of my recent posts, and for now things seem to be working okay. As part of my attempts to "fix" the problems I looked at the hard drive using the SMART disk utility, and also ran "smartctl". The SMART utility reports that there are 3 bad sectors on the drive. When I run fsck, from a live CD, it does not report finding bad sectors. So why would fsck not find something that is reported by smartctl? Which one should I believe?
As a precaution I am now making daily backups of my /home directory and purchased a new HD just in case. Have not yet installed the new HD but at least I am prepared.
View 10 Replies
View Related