Ubuntu :: Gedit Wildcards In Find / Replace Feature

Feb 27, 2010

I am cleaning up some text files to put on a website and am using the find/replace feature of Gedit extensively. The only problem I am having is that I can't find a way to use wildcards. For instance, I want to use the "?" and "*" in the same or similar way you do in bash. I already know that:

Represents a carriage return, and that is great, but I want to do something like: "?." to replace "A.", "B.", "1.", "2." with just plain spaces. The document in question is written in narrative, but has a bunch of outline markers in it, and I want to remove the outline markers.

I tried "escaping" the characters in a similar way as by using "?.", but that didn't work. Google was not very fruitful, and the Gedit help seems to be Gnome help and includes all kinds of useless info (for my problem) about wildcards in other programs.

View 2 Replies


ADVERTISEMENT

Ubuntu :: Vim Find/replace Command Using Wildcards?

Aug 1, 2010

I'm struggling with the Vim find/replace command using wildcards.

I have several, big html files with lots of instances of: <p stuffiwanttoremove>

I've been trying the Vim command: %s/<p *>/<p>/ge

but it doesn't seem to work.

Does anybody know what I'm doing wrong?

I realise there may be alternatives to this (eg a bash script)

View 2 Replies View Related

General :: Regular Expression Search And Replace In Writer Or Gedit?

Oct 26, 2009

I've got a list of files that I've copied from my terminal and pasted into gedit and into OO.o writer. Since the files are all created by gedit, in each case there is both file and file~. I want to get rid of all the 'file~' lines. I thought I could do search and replace using *~, but this doesn't work.

View 4 Replies View Related

Ubuntu :: Can't Find Zen-coding Plugin After Installed In Gedit

May 2, 2010

Zen-coding is a great gedit plugin for html & css development.I download the files and unpack them into ~/.gnome2/gedit/plugins/.After open gedit I can't find zencoding in the Gedit Preference.

View 9 Replies View Related

Fedora :: Multiseat Feature That Had Been In The Feature List At One Point?

Mar 9, 2010

Does anyone know what happened to the Multiseat feature that had been in the feature list at one point?To briefly summarise, a single machine with multiple graphics cards, sound cards, keyboards & mice provides multiple seats for users. Each user gets their own monitor, keyboard, mouse & perhaps audio. The rest of the machine resources are then shared.

The last I saw on the topic was this discussion, although I have a recollection that there was going to be support in a newer version of X.Org. I've googled around quite a bit, but can't seem to find anything.

Anybody know anything? It would be a great feature to have and it's frustrating to have had such an omission since F8 :-o

View 1 Replies View Related

Fedora :: Gedit Changed It's Control - S To Find - Save Back

Oct 25, 2010

Somehow gedit went ahead and modified its hotkeys to have save be nothing, and control s be find. How to get save back?

View 4 Replies View Related

Ubuntu :: Installing Explorer - Command Gedit User.reg (gedit:2573): Gtk-WARNING ** Cannot Open Display

Jan 12, 2010

I am trying to make wine work for explorer. I followed some instructions on this link [URL] To follow this link, I am supposed to

cd ~/ies4linux/ie6
cp user.reg ~/user.reg.old
gedit user.reg

1st and 2nd line went well 3rd line when I try to execute the command gedit user.reg (gedit:2573): Gtk-WARNING ** cannot open display I then /ies4linux/ie6# ls dosdevices(in blue) drive_c(in blue) system.reg(in white) userdef.reg(in green) user.reg

View 3 Replies View Related

Ubuntu :: Find And Replace With Sed At Beginning Of A Word

Nov 15, 2010

I want to write a small script to rename a bunch of files. Their name is of the form 'long number'|'name'|'extension', for example:

52354Football_part2.flv
2353452Nice_weather_4_ducks.flv

I would like to rename these to:

Football_part2.flv
Nice_weather_4_ducks.flv

If in my script I use something like

Code:
sed s/[0-9]//g
on each file, I will get
Football_part.flv, instead of Football_part2.flv,
and
Nice_weather__ducks.flv, instead of Nice_weather_4_ducks.flv.

how to instruct sed to only remove numbers that are in the beginning of the name in a simple way?

View 2 Replies View Related

OpenSUSE :: Gedit With Sudo - (gedit:7137): Gtk-WARNING : Cannot Open Display

Feb 8, 2010

I set-up my Sudo it works but when I use Gedit I get the following message

Jean-Luc@localhost:~> sudo gedit /etc/fstab
(gedit:7137): Gtk-WARNING **: cannot open display:
samething with /etc/sudoers

If I use vi it's ok, I can modify and save. In Fedora it run ok, but with opensuse?

View 9 Replies View Related

General :: Find Or Replace Without Using Sed?

Dec 27, 2010

I am working on writing a script for find and replace a string using sed.But know I want to write without using sed.

View 9 Replies View Related

Software :: Scroll One Line Each Time Like Gedit Does When Scrolling In Gedit?

Oct 29, 2010

When scrolling down in nano with keyboard (holding "down" key), nano scrolls several lines at once each time. Is there any possibility to configure it so it will scroll one line each time like gedit does when scrolling in gedit?

View 3 Replies View Related

General :: Find And Replace String?

Jul 26, 2011

I need to find this "TYPE=MyISAM;" and replace with "ENGINE=MyISAM;" in all .sql files in a directory. How can I do this with sed?

View 2 Replies View Related

General :: Sed Find And Replace With Wildcard?

Aug 5, 2011

I would like help with modifying the following content:

toolbox/perl/man/man3/ExtUtils::Command.3::Command.3 differ
toolbox/perl/man/man3/ExtUtils::Command::MM.3::Command::MM.3 differ
I would like the content to be changed to:
toolbox/perl/man/man3/ExtUtils::Command.3
toolbox/perl/man/man3/ExtUtils::Command::MM.3

I was not sure how to tell sed what to look for? I tried the following but it did not work. sed -i 's/::* differ//g' mandiff.log

View 3 Replies View Related

Software :: How To Find And Replace On All Backslashes

Feb 8, 2010

I'm in the middle of a data migration project and I have a text file where the data in one of the fields contains a "" at the end of each line. I know how to do a find and replace on ALL backslashes using something like this:
Code:
:%s/\//g
The above example would replace all backslashes with nothing, effectively "removing" them. Does anyone know how I can apply a similar function that only removes the backslashes that exist at the end of a line?

View 3 Replies View Related

Ubuntu :: Bash Command To Find And Replace Text In File

Apr 3, 2010

I'm having problems with Tomboy. I have a few hundred note files and I need to go through all of them and replace all instances of "<link:broken>a</link:broken>" with "a". Is there a bash command I can use to do this?

View 2 Replies View Related

General :: Find And Replace Command For Whole Directory

Aug 17, 2011

Is there any command in Linux which will find a particular word in all the files in a given directory and the folders below and replace it with a new word?

View 4 Replies View Related

Programming :: Find And Replace Script In Bash?

Sep 28, 2010

Im looking for assistance to create a script to find and replace files.Probably best if I give you the background Our server uses a specific application which stores user data, each user data account (a folder on the server) has a file called 'Profile.xml' this file gets updated and replaced about every 30 mins similar to the fashion logrotate works i.e. Profile.xml.1 Profile.xml.2 -> .10

What we experience is that if the application crashes unexpectedly while it is doing its user profile refresh task we end up with sometimes a few hundred Profile.xml files which end up 0kb(should be around 4kb) , and our server see's these as corrupted profiles and will not see them. Our fix is to go back thru and rename the Profile.xml.1 to be Profile.xml (or sometimes up to Profile.xml.5 to Profile.xml) We want a script we can manually run to automate this process The server tree is

/mnt/array1/username/db/Profile.xml
/mnt/array2/username/db/Profile.xml
etc
etc

What we have so far is a script which finds the affected files

find /mnt/ -maxdepth 4 -name Profile.xml -size -1k

This will display a list of affected profiles, and we can append it to a text file with >>output.txt on the end.

if 'pattern' in 'location' equals '0kb' then 'cp' Profile.xml.1 Profile.xml

View 4 Replies View Related

General :: Find And Replace Text From Many Files In A Dir?

Jul 8, 2010

I have a many directories each with about 20 html files inside. All the files have .html ext. What I'm hoping is possible is from command line to find some text in each one and replace it with some other text.

Basically what I want to replace is;

/awstats/
with
awstats/

I can do this easily with dreamweaver or some other application but because I have 960 pages total to do I'm hoping to do it this way.

View 6 Replies View Related

Server :: Find And Replace In Multiple Files In Ssh?

Jul 3, 2010

Find and replace in multiple files in ssh?

View 1 Replies View Related

Programming :: Exact Text Find And Replace?

Aug 13, 2010

I have a sysctl.conf that has the following in it:

kernel.exec-shield-randomize = 1
kernel.exec-shield = 1

When I grep kernel.exec-shield I get both line, hence I keep over writing the kernel.exec-shield-randomize in my script because it finds them both for my sed commend.

How can I get an exact match with either sed/awk/grep in shell so I can do a find and replace?

Example: sed 's/^kernel.exec-shield =.*/kernel.exec-shield = 1/g' /etc/sysctl.conf will replace BOTH lines

Example: grep "^kernel.exec-shield" find both line and I want it to find only the exact line.

View 3 Replies View Related

Programming :: Find And Replace Multiple Instances?

Aug 13, 2010

I have a file with the following in it:

:0 local /usr/X11R6/bin/X -nobanner
:1 local /usr/X11R6/bin/X

I need to add "-nolisten tcp" to both of these lines and cannot figure out how to do it. I can get it to do the first one, but not the 2nd and so on. How do I search the file and loop though it to change them all?

View 14 Replies View Related

Programming :: Find And Replace With A Shell Script?

Mar 10, 2009

What is best way to replace the 1 and the 3 below with a 0 using a shell script? It is in a text file with lots of lines and similar lines:

lots of text
...
useHeloBlacklist:=1
DoIPinHelo:=3
...
lots of text

View 5 Replies View Related

Ubuntu :: Using Wildcards In Nautilus?

Aug 21, 2010

I'm try the use wildcards for file searches in Nautilus (ctrl+s) but using sets and character classes doesn't return any results. For example

[[:upper:]]*
[![:digit]]*
*[[:alpha:]]
[crm]*

Is this kind of notation supported in Ubuntu or do I have something wrong in my syntax.

View 1 Replies View Related

Ubuntu :: Command Line - Find And Replace Text Within Multiple Files?

Aug 28, 2010

I'm pretty sure this is doable from the command line, but my CLI skills have degraded a lot since my pre-Y2K admin days. The goal is to search all the files in the directory for a very long string of text and replace it with another string of text. The text being searched for is my Google Adsense code (which will be stripped from my website) and it will be replaced with a placeholder so I can easily tack something else in there in the future.

Seeing how I have that long snip of code on about 100 pages, automating the process would make life easier.
If I was searching for a single word, I can see ways to do this.
If I paste the code I'm searching for into a text file, is there a way to:
find (contents of oldstring.txt) and replace with (contents of newstring.txt)?

View 9 Replies View Related

General :: Find & Replace String In Multiple Files?

Jan 15, 2010

After hours (literally) of searching the web and reading man pages, I think I've come up with the following:Code:find . -exec grep 'path/to/file' -print | xargs -0 -I new_path mv {this is where I get confused}So my code above is incomplete, obviously. In order to finish replacing the string, I need to mv the new file into the old file's spot. How do I do this, by incorporating it into my line of code?

View 14 Replies View Related

General :: Awk / Grep Or Sed - Find And Replace Recursively From Files

Feb 12, 2010

I am new to linux as well as awk, grep or sed. I need a find and replace command single liner or script that loops trough input file (file1) and find the particular input in file2 and add "!" in front of the found string.

Example:
input file: file1
g+h=o+p
a+b=c+d
file2 (file that need to look for)
a+b=c+d1e105
x+y=z+s5e105
g+h=o+pabcdefg
t+r=w+qxvyderf

Output file (file3 should look like this)
!a+b=c+d1e105
x+y=z+s5e105
!g+h=o+pabcdefg
t+r=w+qxvyderf

I have tried many awk and sed method of find and replce but it did not work the way I wanted. This is mainly due to my lack of experience in awk and sed. The program should loop trough file1 and find in file2 and output in file3 for the 1st (g+h=o+p) set then repeat the same process again for set 2 (a+b=c+d).

View 14 Replies View Related

General :: Command To Find / Replace In A Text File?

Feb 11, 2011

I have an SQL dump, file.sql that has many references to a particular domain, d1.com. I would like to run a command that can replace every occurrence of d1.com with d2.com. I've tried looking into sed before but the man pages are quite daunting.

View 14 Replies View Related

Server :: Using Find And Replace Command In Perl Script?

Jun 15, 2011

I have one perl sctipt which generate cfg file with ^M in all the EOL. I need to remove the ^M from the cfg file. How can i remove that from the perl script itself. I have tried the following unix command in perl script,

system("perl -pi -e 's/^M//g' *.cfg");

It doesn't work.

View 5 Replies View Related

Software :: Openoffice: Disable Autocomplete Within The Find And Replace Box?

Mar 19, 2011

I don't want to go into a lot of detail as to why, but suffice to say, I detest autocomplete, anywhere, in any form. I'll leave it at that and save the venting for another time. Now, I've disabled autocomplete within a document, that's not too hard, by disabling the "Enable word completion." But, that seems to have no effect on the "Find & Replace" box. Googling doesn't seem to find anything, except another person that also seems to hate it on the OpenOffice message boards, and they were not helpful. That was also about five years ago, if that makes any difference.

View 2 Replies View Related

Programming :: Find And Replace Using Passing A Parameter To Said Command?

Apr 9, 2010

I am trying following script can I do this or is there a way to do find and replace the replacing word is dynamic input by user

echo -n "Enter name:"
read RP_USER
sed 's/text1/$RP_USER/' /home/user/file1 > /home/user/file2

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved