phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Text Editors / Unix Tricks


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
Notpil22
Board Member



Joined: 21 Jan 2009

Posts: 19



PostPosted: Fri Feb 06, 2009 8:20 pm 
Post subject: Re: "Banned" - Notification Message

Holger wrote:
There are some editors available which you can use to search all textfiles in a folder.
Search for "If you think this is a mistake".

/H



Which editors H ? -
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Fri Feb 06, 2009 8:40 pm 
Post subject: Re: "Banned" - Notification Message

UltraEdit is what I use when I work on my personal computer. The unix command "grep" can be used when on a server to search for text in files.
_________________
phpBBDoctor Blog
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Fri Feb 06, 2009 8:51 pm 
Post subject: Re: "Banned" - Notification Message

Notpil22 wrote:

All fixed up now though - thanks

I guess I'll have to become banned to find out what your email address is. icon_razz.gif icon_neutral.gif

drathbun wrote:
The unix command "grep" can be used when on a server to search for text in files.

Grep is my hero. I had heard of it, but never used it until it was mentioned in one of the phpBB blog entries about "Exploits from the Crypts" (which I thought was dumb and pointless to post). And now I use it all the time.

If you use a Mac, there is a rather fancy development environment called Coda which allows multi-file search and many other useful things.

_________________
Moof! Email me: dog_cow@macgui.com
Inside Allerton Park • Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL • Mac 512K Blog
Back to top
dogs and things
Board Member



Joined: 18 Nov 2008

Posts: 621
Location: Spain


flag
PostPosted: Fri Feb 06, 2009 8:55 pm 
Post subject: Re: "Banned" - Notification Message

I don΄t know if UltraEdit is free but I do know Crimson Editor is and it can search in multiple files too. I like it, maybe mainly because I got used to it over the years.
_________________
phpBB2 will never die, I hope!
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Fri Feb 06, 2009 8:59 pm 
Post subject: Re: "Banned" - Notification Message

UltraEdit is not free, but well worth the cost.

grep ... along with other unix commands ... can make you very productive. Suppose you wanted to find a particular string that you need to change, and it appears in multiple files (say more than one template file). This simple command will search your server for every template file containing 'string' and load it into the vi editor:
Code:
vi `grep -ilr string *.tpl`

_________________
phpBBDoctor Blog
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Fri Feb 06, 2009 9:04 pm 
Post subject: Re: "Banned" - Notification Message

drathbun wrote:
UltraEdit is not free, but well worth the cost.

grep ... along with other unix commands ... can make you very productive. Suppose you wanted to find a particular string that you need to change, and it appears in multiple files (say more than one template file). This simple command will search your server for every template file containing 'string' and load it into the vi editor:
Code:
vi `grep -ilr string *.tpl`

I don't use a Unix line editor! icon_eek.gif No, I use the graphical TextEdit program for OS X. One problem I have with grep is how to escape some characters like $. My knowledge has gaps. icon_neutral.gif

_________________
Moof! Email me: dog_cow@macgui.com
Inside Allerton Park • Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL • Mac 512K Blog
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Fri Feb 06, 2009 9:05 pm 
Post subject: Re: "Banned" - Notification Message

In most cases you escape with the \. So if you want to search for a $ you would add \ and make it \$. To search for a slash, you escape it with a \\ entry.
_________________
phpBBDoctor Blog
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Fri Feb 06, 2009 9:10 pm 
Post subject: Re: "Banned" - Notification Message

drathbun wrote:
In most cases you escape with the \. So if you want to search for a $ you would add \ and make it \$. To search for a slash, you escape it with a \\ entry.

Well, that would make sense! I will try that next time.

Now what I need is grep-replace, so I can search for files which have the string, and then automatically replace it.

_________________
Moof! Email me: dog_cow@macgui.com
Inside Allerton Park • Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL • Mac 512K Blog
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Fri Feb 06, 2009 9:17 pm 
Post subject: Re: "Banned" - Notification Message

Dog Cow wrote:
Now what I need is grep-replace, so I can search for files which have the string, and then automatically replace it.

sed ftw

_________________
phpBBDoctor Blog
Back to top
Daz
Board Member



Joined: 17 Dec 2008

Posts: 32
Location: Yorkshire, England


flag
PostPosted: Fri Feb 06, 2009 11:23 pm 
Post subject: Re: Text Editors / Unix Tricks

Hi,

EditPad Pro does it for me, especially the RegEx features icon_smile.gif
Scite isn't to be sniffed at.

I am not ashamed to use Dreamweaver (me likes to be able to add missing features via scripting) - some things have to be interactively done.

Anything more complicated is a simple matter of DirectoryIterator|glob() >> file_get_contents() >> preg_*() >> file_put_contents.

Many of the Unix goodies are available for Windoze.

Daz
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sat Feb 07, 2009 1:19 pm 
Post subject: Re: Text Editors / Unix Tricks

Notepad++ is great and FREE. icon_wink.gif
_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0219 seconds using 15 queries. (SQL 0.0017 Parse 0.0006 Other 0.0195)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo