Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-17-2004, 06:04 AM   #1
doornx
Confirmed User
 
Join Date: Nov 2003
Location: ICQ : 946 3375
Posts: 2,531
removes newlines from textfiles

Hmm..since this isn't an "i'd hit it" thread i'm not expecting to win an xbox for the longest thread of the week

I have a dozen files and want to remove the newline (enter)
from them all..not by hand but batch wise

The newline is also the /n code but i can't seach/replace it for some reason since it somehow search for the exact same /n in the text

Would appreciate it if someone knows an editor/prog who can do this

( i can't code for shit so that won't be an option )
__________________
Send me a PM for design work
doornx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 06:17 AM   #2
FuqALot
Confirmed User
 
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
#!/usr/bin/perl
print "Content-type:text/html\n\n";
open(filex,"yourtextfile.txt");
@textfile = <filex>;
close(filex);
foreach $linex (@textfile) {
chomp($linex);
push(@text,$linex);
}
open(filex,">textfile.txt");
print filex @text;
close(filex);

quote the post if the code is looking funny.
something like this.

Last edited by FuqALot; 07-17-2004 at 06:19 AM..
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 06:21 AM   #3
doornx
Confirmed User
 
Join Date: Nov 2003
Location: ICQ : 946 3375
Posts: 2,531
k thanks..i'll try something in perl or php since i couldn't find a regular editor who can do this strangely enough
__________________
Send me a PM for design work
doornx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 06:35 AM   #4
Adultnet
Confirmed User
 
Join Date: Sep 2003
Posts: 8,713
Quote:
Originally posted by doornx
k thanks..i'll try something in perl or php since i couldn't find a regular editor who can do this strangely enough
good luck
__________________


TrafficCashGold Paying Webmasters Since 1996!

Awesome Conversions! Fast Weekly Payments! Over 125 Tours!
Adultnet is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 06:36 AM   #5
Robertf
Confirmed User
 
Join Date: Feb 2004
Posts: 392
Editplus

You can use regular expression to ... search and replace
__________________
....
Robertf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 06:51 AM   #6
doornx
Confirmed User
 
Join Date: Nov 2003
Location: ICQ : 946 3375
Posts: 2,531
Quote:
Originally posted by Robertf
Editplus

You can use regular expression to ... search and replace
k checking it out thanks
__________________
Send me a PM for design work
doornx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 06:55 AM   #7
doornx
Confirmed User
 
Join Date: Nov 2003
Location: ICQ : 946 3375
Posts: 2,531
Quote:
Originally posted by Robertf
Editplus

You can use regular expression to ... search and replace
damn it works

thanks
__________________
Send me a PM for design work
doornx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 07:02 AM   #8
Robertf
Confirmed User
 
Join Date: Feb 2004
Posts: 392
Quote:
Originally posted by doornx
damn it works

thanks
You're welcome
__________________
....
Robertf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-17-2004, 07:51 AM   #9
sweet7
Confirmed User
 
Join Date: May 2003
Posts: 1,792
Quote:
Originally posted by Robertf
Editplus

You can use regular expression to ... search and replace
__________________
ICQ: 282814268
sweet7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.