how to alter txt files
Page 1 of 2 Goto page 1, 2  Next
AwE




Posts: 1686

PostPosted: Mon, 1st Mar 2010 16:28    Post subject: how to alter txt files
I need to alter hundreds of lines. the lines that i want to remove always start with the same expression.
So, how to do this? well - i could write a little app - but I`m sure there`s an editor that can do this.
find exprssion on beginning of each line - delete the line.
Back to top
TSR69
Banned



Posts: 14962
Location: Republic of the Seven United Provinces
PostPosted: Mon, 1st Mar 2010 16:33    Post subject:
hmm yes some alteration in words and expressions is very important if you want to produce some quality text
perhaps writing something and then print it and reread the stuff you wrote an hour or so later is best way if you want to stay creative
an semantic algorithm that helps you with it, kills the creativity


Formerly known as iconized
Back to top
FastMemFirst




Posts: 613
Location: Chipmem
PostPosted: Mon, 1st Mar 2010 16:38    Post subject:
I use UltraEdit for such tasks. You simple record a macro for one line and play it over the whole file. Its done in 5 minutes.
Back to top
AwE




Posts: 1686

PostPosted: Mon, 1st Mar 2010 16:48    Post subject:
FastMemFirst wrote:
I use UltraEdit for such tasks. You simple record a macro for one line and play it over the whole file. Its done in 5 minutes.


thx - will try
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Mon, 1st Mar 2010 17:11    Post subject:
Notepad++ free alternative to ultraedit.


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
swingman




Posts: 3602

PostPosted: Mon, 1st Mar 2010 17:19    Post subject:
Couldn't you do it with Find and Replace? Just enter the expression you want to delete in the 'Find' field leaving the 'Replace with' field blank. Click 'Replace All' and you should be done without the need for any other program/macro/script.
Back to top
nouseforaname
Über-VIP Member



Posts: 21306
Location: Toronto, Canada
PostPosted: Mon, 1st Mar 2010 17:20    Post subject:
swingman wrote:
Couldn't you do it with Find and Replace? Just enter the expression you want to delete in the 'Find' field leaving the 'Replace with' field blank. Click 'Replace All' and you should be done without the need for any other program/macro/script.


his problem is he wants to delete the entire line, not just the text string Smile


asus z170-A || core i5-6600K || geforce gtx 970 4gb || 16gb ddr4 ram || win10 || 1080p led samsung 27"
Back to top
swingman




Posts: 3602

PostPosted: Mon, 1st Mar 2010 17:24    Post subject:
Didn't read that part. I guess it would require a macro in Word to search for the string and delete text till the next period.
Back to top
Parallax_
VIP Member



Posts: 6422
Location: Norway
PostPosted: Mon, 1st Mar 2010 20:24    Post subject:
Notepad++ supports regexp replacing.


Upcoming PC games 2009 and onwards
Bravery is not a function of firepower.
Back to top
Lutzifer
Modzilla



Posts: 12740
Location: ____________________ **** vegan zombie **** GRRAAIIINNSS _______
PostPosted: Mon, 1st Mar 2010 22:14    Post subject:
yeah, notepad++ is really neat for that. I never got it to do multiple lines though. If somebody knows a tool for that as well, post it here =)

edit: i also like crimson editor alot, when it comes to free txt editors. Both can search and replace over all opened files, which is also pretty neat imho Very Happy
Back to top
AwE




Posts: 1686

PostPosted: Tue, 2nd Mar 2010 01:27    Post subject:
thx guys - i used my favourite editor editplus.

the regular expression function is pretty usefull (even if its not so mighty as some languages).
Problem was - if the comment starts mid of a line, it should just delete the rest of the line, and even there have been some exceptions. Got it working.
Back to top
pistolshrimp
Über-VIP Member



Posts: 11007

PostPosted: Tue, 2nd Mar 2010 03:10    Post subject:
Haha, I thought , I was a sooo smart when I had to figure that out 2 yrs ago. Worked fine for me. with the proggieI found!!! ME <--apple. I know you hate me!!!!
Back to top
pistolshrimp
Über-VIP Member



Posts: 11007

PostPosted: Tue, 2nd Mar 2010 03:12    Post subject:
Sad sorry!!!
Back to top
Lutzifer
Modzilla



Posts: 12740
Location: ____________________ **** vegan zombie **** GRRAAIIINNSS _______
PostPosted: Tue, 2nd Mar 2010 18:50    Post subject:
hey, we all love apple, we just cant all express it properly (or dont have the money to make apple love us back Laughing )
Back to top
nerrd




Posts: 3607
Location: Poland / USA
PostPosted: Tue, 2nd Mar 2010 19:57    Post subject:
Slightly off topic:
For a while I've been looking for a text editor that would let me sort each line of that file alphabetically. Also I need an app to compare two almost identical text files and let me see what, if anything differs between them. Would any of the above suggested editors let me do that?
Back to top
Lutzifer
Modzilla



Posts: 12740
Location: ____________________ **** vegan zombie **** GRRAAIIINNSS _______
PostPosted: Tue, 2nd Mar 2010 20:42    Post subject:
i use total commander for file comparisons (and nearly everything else). As for alphabetical ordering of text. You could try to copy and paste or import it into excel maybe and just order it alphabetically?
Back to top
FastMemFirst




Posts: 613
Location: Chipmem
PostPosted: Tue, 2nd Mar 2010 22:38    Post subject:
Yes, Total Commander is the swiss army knife for the daily file operation tasks. Cant live without since NC has stopped development. UltraEdit does everything you could imagine with texts, all type of sorting and replacing you ever need. Not quite sure but the free Notepad++ should be able to sort too.
Back to top
nerrd




Posts: 3607
Location: Poland / USA
PostPosted: Tue, 2nd Mar 2010 23:47    Post subject:
I almost got a hardon when I saw the file compare feature in Total Commander. Perfect for what I need it to do. Reminds of something I used back in the DOS days. Norton Commander perhaps?

Now playing with UltraEdit, and seems that once I figure out how to use the sort feature properly it will work just fine.

TYVM for help.
Back to top
Lutzifer
Modzilla



Posts: 12740
Location: ____________________ **** vegan zombie **** GRRAAIIINNSS _______
PostPosted: Tue, 2nd Mar 2010 23:51    Post subject:
yeah, it's very much like norton commander and i even have set the colours to blue / yellow so it looks more like it =)
Back to top
nouseforaname
Über-VIP Member



Posts: 21306
Location: Toronto, Canada
PostPosted: Tue, 2nd Mar 2010 23:53    Post subject:
without googling ... does total commander handle non txt files like .doc or .docx for comparison?


asus z170-A || core i5-6600K || geforce gtx 970 4gb || 16gb ddr4 ram || win10 || 1080p led samsung 27"
Back to top
nerrd




Posts: 3607
Location: Poland / USA
PostPosted: Wed, 3rd Mar 2010 00:00    Post subject:
Just tried comparing two bitmaps and the program did that without complaining. I would assume it will compare anything you throw at it.
Back to top
nouseforaname
Über-VIP Member



Posts: 21306
Location: Toronto, Canada
PostPosted: Wed, 3rd Mar 2010 00:02    Post subject:
but what kind of output does it give? the actual text that is different in each file?

I guess I'm asking along the lines of version control since sometimes coworkers forget to track changes on docs we're co-working on Smile


asus z170-A || core i5-6600K || geforce gtx 970 4gb || 16gb ddr4 ram || win10 || 1080p led samsung 27"
Back to top
nerrd




Posts: 3607
Location: Poland / USA
PostPosted: Wed, 3rd Mar 2010 00:04    Post subject:
It displays each file side by side, highlighting the differences between the two. You get an option to copy each line from/to either file with a click of a button.
Back to top
nouseforaname
Über-VIP Member



Posts: 21306
Location: Toronto, Canada
PostPosted: Wed, 3rd Mar 2010 00:08    Post subject:
wow, sounds awesome. too bad my work is retarded and would never allow that software to be installed on the network. guess it will be good working from home though Smile


asus z170-A || core i5-6600K || geforce gtx 970 4gb || 16gb ddr4 ram || win10 || 1080p led samsung 27"
Back to top
Lutzifer
Modzilla



Posts: 12740
Location: ____________________ **** vegan zombie **** GRRAAIIINNSS _______
PostPosted: Wed, 3rd Mar 2010 00:10    Post subject:
nouseforaname wrote:
but what kind of output does it give? the actual text that is different in each file?

I guess I'm asking along the lines of version control since sometimes coworkers forget to track changes on docs we're co-working on Smile


depends on the docs. With word documents it doesnt "work" that well, but anything that is mainly text, it s really good.

if you want to do it oldschool, you can always do it from a command prompt with 'fc' as well Very Happy
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Wed, 3rd Mar 2010 00:45    Post subject:
Version controlling? SVN... Or do you want to see the diffs in .DOC files?


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
nouseforaname
Über-VIP Member



Posts: 21306
Location: Toronto, Canada
PostPosted: Wed, 3rd Mar 2010 00:49    Post subject:
PumpAction wrote:
Version controlling? SVN... Or do you want to see the diffs in .DOC files?


we all edit and work on doc files... the problem is sometimes we get something that we have submitted to the publications/communications department and they make changes without actually using the track changes function in ms word, which makes it hard to figure out exactly what they did (especially over a 50-60 page document and it's important because sometimes they change technical language into "plain" language and lose the meaning of what was originally written). Any easy way to highlight changes (informally is fine) would be helpful Smile


asus z170-A || core i5-6600K || geforce gtx 970 4gb || 16gb ddr4 ram || win10 || 1080p led samsung 27"
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Wed, 3rd Mar 2010 00:56    Post subject:
http://newgeeks.blogspot.com/2006/08/word-document-management-using-svn.html Smile

Install the subversion server on a machine and commit all the changes to the file to that reposistory Smile You can go back and forward in time, create branches, see the differences and merge files.


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
Lutzifer
Modzilla



Posts: 12740
Location: ____________________ **** vegan zombie **** GRRAAIIINNSS _______
PostPosted: Wed, 3rd Mar 2010 00:59    Post subject:
maybe saving original and changed doc in .rtf and then use a file-compare program like the one in total commander? But there are also file compare utilities out there for word docs it seems, judging from teh mighty google:

http://www.softinterface.com/WDD/WDD.HTM
http://www.comparesuite.com/solutions/document_comparison_for_ms_word_doc_files.htm
http://www.ultraedit.com/products/ultracompare/tour/compare-two-documents.html

those are not free, and might be shitty still.

edit: or do what pumpy said Laughing
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Wed, 3rd Mar 2010 01:02    Post subject:
SVN is free and open source Sad We use it on a daily basis and sometimes we make love with it too because it is so awesome Sad


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
Page 1 of 2 All times are GMT + 1 Hour
NFOHump.com Forum Index - General chatter Goto page 1, 2  Next
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group