Hack Forums
Is there any programs that will do this automatically for me? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+---- Thread: Is there any programs that will do this automatically for me? (/showthread.php?tid=5086909)



Is there any programs that will do this automatically for me? - JASON AND MEDEA - Dec 8, 2015

So basically I have a list of this with over 600 lines on it and I need a comma at the end of every line, I can't be bothered sitting here adding comma's and I'm sure there is something out there that'll do it for me. Please help! 🎉


* - Shoe - Dec 8, 2015

http://stackoverflow.com/questions/11003761/notepad-add-to-every-line
There ya go.


* - Armada - Dec 8, 2015

Macro would do it bro, record the key strokes and repeat. 🤝


* - Closed User - Dec 9, 2015

Download Notepad++

1. CTRL+F
2. Click the "Replace" tab
3. Mark regex at the bottom-left
There's 2 textboxes that you fill out, what you want to replace with whom
4. Click "Replace All" at the right side :)


* - How bout using your brain - Dec 10, 2015

linux makes your life easy:

Code
sed 's/$/,/' yourfile



* - Josh‎ - Dec 10, 2015

If you need this send me a PM and I'll make it, or do as "The Thrill" said and use Notepad++


* - Bot Ulric - Dec 10, 2015

If you have a mouse with buttons that are customizable, create a macro that will insert a comma and go down a line etc.


* - Energy Wizard - Dec 10, 2015

http://www.textfixer.com/tools/alphabetize-text-words.php Can do this (tick the box that says "Use a comma separator (For csv style data and arrays)").


Edit: Doesn't seem to working, sorry OP.


* - XKRYPTOX - Dec 10, 2015

(Dec 10, 2015 06:04 PM)Bot Ulric Wrote:  If you have a mouse with buttons that are customizable, create a macro that will insert a comma and go down a line etc.

I do this :D


* - Betty Blue - Dec 10, 2015

I'd much rather prefer to do this with vim.
PHP Code

<?php 
:%s!^!,! 



* - Dvorak - Dec 10, 2015

(Dec 10, 2015 07:46 PM)Dead Head Wrote:  I'd much rather prefer to do this with vim.
PHP Code

<?php 
:%s!^!,! 

Vi can do the same thing but it's available on more vanilla platforms than Vim is.


* - Betty Blue - Dec 10, 2015

(Dec 10, 2015 07:48 PM)Dvorak Wrote:  Vi can do the same thing but it's available on more vanilla platforms than Vim is.
You owe me even more beers for this.


* - Loki123 - Dec 11, 2015

(Dec 10, 2015 07:48 PM)Dvorak Wrote:  Vi can do the same thing but it's available on more vanilla platforms than Vim is.

Have you really not understood yet the usage of a stream editor ?

PHP Code

<?php 
sed 
"s/$/,/g" <filename> 

PHP Code

<?php 
awk 
'{print $0","}' <filename> 

Applies to both you eve and Zack.


* - Betty Blue - Dec 11, 2015

(Dec 11, 2015 06:30 AM)Loki123 Wrote:  Have you really not understood yet the usage of a stream editor ?

PHP Code

<?php 
sed 
"s/$/,/g" <filename> 

PHP Code

<?php 
awk 
'{print $0","}' <filename> 

Applies to both you eve and Zack.
There isn't just one way to skin a cat nice person