Software :: Sed And Regexp For Search In Multilines?
Sep 24, 2010
I've a text file which have a structure like:
<managed-data-source .....
name="nameDS"
/>
<connection-pool ....
code....
If you execute the previous command, you will see that it also displays connection-pool lines.
View 10 Replies
ADVERTISEMENT
Jul 13, 2010
What keyboard shortcut will give me a regexp reverse search in bash? Or does C-r supply something like that already that I can't figure out?
View 4 Replies
View Related
Apr 22, 2010
I have a sed script to search and replace a pattern on the next kind of text:
Code:
C/username/Mydocuments/games & music
C/username/Mydocuments/New files 09-17-2007
C/username/settings
The script is:
code....
View 9 Replies
View Related
Jun 26, 2011
I have a batch rename task and I find the 'rename' command in Ubuntu and Fedora is different.In Ubuntu, rename is written in Perl and has regexp support. Is there anyway to install it on Fedora?
View 1 Replies
View Related
Mar 10, 2011
I have something like...
Code:
var=beer
# echo ${var/%e/E} doesn't do anything because i can only replace "r" or "er" this way
[code]....
View 1 Replies
View Related
Jun 5, 2010
Im using posfix as a outgoing mail server, here i want to distribute the mails to different ips to avoid the ip blacklisting. I found a solution by using multiple transports , but here one thing blocking me was i could not able to select a transport using regexp or pcre matching pattern, log says that
Code:
Jun 5 07:12:49 server postfix/trivial-rewrite[6079]: warning: pcre map /etc/postfix/transport.pcre, line 1: regular expression substitution is not allowed: skipping this rule
the transport used for this purpose is:-
Code:
#cat /etc/postfix/transport.pcre
/^.*@([a-z])ol.com$/ transport$1:
View 2 Replies
View Related
Mar 1, 2011
I'm using an 'if' statement to check whether one of positional arguments is a word or a construction like "x-y", but something doesn't seem right.
Here is the relevant part of the code:
Code:
if [[ "$3" =~ [a-Z]-[a-Z] || "$3" =~ [a-Z] ]]; then
grepRange=$3; else grepRange=$4
fi
And for the input like this:
[Code]....
but shouldn't the $grepRange variable be blank in this case?
Bash version is 4.1.7(1)
View 6 Replies
View Related
Oct 20, 2010
Have a bash script which contains a line like this:
if [[ ${array[${last}]} =~ "screenpc.PRODUCTION.*" ]]
which WORKED as expected in bash 4.0.33 and now fails in 4.1.2
Instrumented the script to print the value of the left-hand side and it is exactly what is expected.
As noted above, this has been working fine until we installed Fedora 13 (kernel 2.6.33), and now it fails.
Tried setting shell 'extglob' to On with same results.
Did something change? Are there other shell/bash options that need to be set?this has the whole installation stopped!
View 10 Replies
View Related
Dec 10, 2010
How do I write a regexp that matches a string that begins with whitespace or contains a newline, but not necessarily both?
View 2 Replies
View Related
Sep 3, 2010
I am interested in the following problem: given a string (pattern) find a regexp which match this pattern.
I will need this for a developing of an idea 'pattern based filtration'.
View 3 Replies
View Related
Apr 5, 2011
i guess this is an installation issue as i am newish to Linux and got a F14 laptop from a used/refurb store... Anyway it seem i have difficulty with getting GTK running or maybe it is WGET...?
i did manage to install apt-get and was able to run synaptics ... but now whenever i try to run synaptics it flashes the interface and crashes. i tried apt-get search wget and it says invalid operation search. i tried apt cache wget and get a crash box in the upper right corner... i tried apt-get gtk+extra-2.1.2-4.fc14 and it says invalid operation gtk...
All of which is frustrating my attempts to get the GTK interface to J working. Their script uses WGET which i also cannot get.
View 6 Replies
View Related
Feb 10, 2011
I need to compare 2 files using diff. The problem I've encountered is that I need to exclude certain lines that contain certain phrases. I know that diff supports the -I switch but no matter how I try to form the regexp it doesn't seem to work the way I expect it to. If anyone has used the -I switch before could you please post some examples of how it is used.
diff -I "[skipthisline]" file1 file2 > output.diff
I need to exclude lines that contain the string "[skipthisline]" but I have no idea what syntax is used after the -I switch. Is is supposed to be included in quotes or slashes /[skipthisline]/ or entered without either? I need to include a backslash before each bracket so that it's not interpreted as a set of characters like [a-z] but is instead interpreted as a string. Do I need to use 2 backslashes? "\[skipthisline\]"
Is it sufficient to simply type the string I want to match or do I need to match the entire line in order to exclude it from the output?
.*[skipthisline].*
or
^.*[skipthisline].*$
View 2 Replies
View Related
Sep 17, 2009
I am trying to delete lines of a file if they contain text that is present on another file. For example
> cat one.txt:
a
b
c
d
[code]....
I get the following output:
> ./test.sh one.txt two.txt
a
b
d
e
[code]....
View 6 Replies
View Related
Jun 12, 2010
The desktop search has stopped working in Gnome.I get a message that says 'Search Service not running' with a button that says 'Start Search Service'.When I click the button nothing happens
View 1 Replies
View Related
Jun 16, 2011
I'm trying to find a good desktop search tool. Beagle is dead, Recoll and Strigi are KDE, and Tracker is not many features (can't even search Thunderbird 3). Do I miss something? Is desktop search on Linux dead? Should I use Google Desktop Search instead
View 2 Replies
View Related
Nov 13, 2010
for example we search a file for a certain keyword..is there any application available which will enable us to search for a single keyword in all the files within the folder ?i want to search for a keyword in about 1000 files..if i do it manually it will take loads of time..
View 6 Replies
View Related
Feb 2, 2011
When i use search command with yum,i get a lot of error messages and then the correct result.
The output at terminal is as follows:
View 4 Replies
View Related
Feb 23, 2010
I'm using fedora 12 and I would like to install komodo editor, whose documentation specify there is a prerequisite : libstdc++6.but accordingly to the siteit seems that libstdc++ is part of the gcc project.and g++ is in the version 4.4.3, not in the version 6
View 3 Replies
View Related
Sep 7, 2011
I would like to run a script from any location. The script is in ~/scripts, so I added ~/scripts to my PATH. However, since I have to run it with 'sh script.sh' (due to the permissions on the directory), it doesn't seem to look in PATH for the file script.sh. Is there a way to get it to do this?
View 11 Replies
View Related
Feb 26, 2010
When i type in a key word of a file that is certainly on my computer, no results are returned. I remember a while back a certain symbol had to be enetered in order to do the search.
Code:
Could not launch the KDE Help Center:
KDEInit could not launch 'susehelp'.:
[code]...
View 2 Replies
View Related
Feb 7, 2010
I was wondering how I would search and replace all /'s with -'s in vi. %s///-/g doesn't work obviously.
View 2 Replies
View Related
Jan 13, 2010
How do you search for folders in Ubuntu? The find function is great at locating files, but is ignoring folders that I know exist on my computer, even when I add the "Show hidden files" option to search. Same with entering find or locate in terminal.
View 5 Replies
View Related
Mar 23, 2010
Im trying to use the places -> search tool and I get the following error:
Quote: The search results may be invalid. There were errors while performing this
Here is a screenshot since some of the text can't be selected in the error box.
View 5 Replies
View Related
May 31, 2010
I'm using Ubuntu 9.10 with KDE 4.
I want a desktop search program for KDE 4 like GNOME has beagle and tracker.
I know about Nepomuk but it seems too slow and resource heavy.
When I used to use KDE 3 I used a desktop search program called Kerry (a KDE frontend to Beagle) but I don't think has a KDE 4 version.
good desktop search program for KDE 4.
View 6 Replies
View Related
Dec 19, 2010
Is there any way, either with something included or with a program that can be set up to search for files in Ubuntu? I need something like the search for files or folders that was available in Windoze 98 and 2000. I have tried the built in search under "places" and I have found no way to get it to search a full drive or all drives.
View 5 Replies
View Related
Jan 28, 2011
If I'm in a folder and I press a letter, a text box would pop up at the button and the letters would go in there. It's very annoying, because when I am listening to songs, I press more the one key at the same time so I can find the song I want fast. Impossible to do this in Ubuntu with the search box.
View 2 Replies
View Related
Feb 19, 2011
I downloaded some software using tar.gz got it opened and working etc but every time I need to use the program I have to go the downloads find the tar.gz then find bin to use it again. Is there anyway I can put it somewhere so I can find it. I am using 10.04.
View 2 Replies
View Related
Jun 15, 2011
For some reason Ubuntu's built-in file search app doesn't find the file I'm looking for sometimes. My 10.10 build has been running excellently for some time now and haven't experienced any problems but this is a wierd one. If I use another app like Catfish it usually finds the sought file, but sometimes it gives a fatal error and stops working. Others have had this problem with Catfish, too, so I'm looking for another reliable file or folder search app. I've went thru what I could find in the Software Center but haven't found anything really good. I need an app that'll search for hidden files or folders on the whole PC
View 5 Replies
View Related
Jun 20, 2011
I have noticed that a number of people refer to using a PPA to get the latest version of programs. Some refer to conducting searches for a PPA. I have added some PPA's posted by others, but am unsure on how or where to search for a PPA. A search in a normal search site (such a Google) provides pages of results for Pan Pacific Aggregates.
View 3 Replies
View Related
Jul 23, 2011
I installed Ubuntu 11.04 64 bit in msi cr500 laptop. The search tabs does not work in here.
View 1 Replies
View Related