Search found 160 matches
- 19 Aug 2013 19:18
- Forum: DOS Batch Forum
- Topic: Fastest way to extract IP:port occurances any text file?
- Replies: 16
- Views: 21116
Re: Fastest way to extract IP:port occurances any text file?
Thanks Foxdrive. Yes, I know its a batch file; but I still consider it as a added dependency file; unless I include the entire findrepl.bat code into all my batch files that need to use it It if it was a few lines of code, then it might have been a difference story. I guess the issue is moot anyway ...
- 19 Aug 2013 10:38
- Forum: DOS Batch Forum
- Topic: Fastest way to extract IP:port occurances any text file?
- Replies: 16
- Views: 21116
Re: Fastest way to extract IP:port occurances any text file?
Penpen/Endoro and all, thanks so much for taking the time to offer various ways to search quickly IP:port. It is very nice to see some of the greatest batch file scripters collaborate here. I'm still trying to decipher Penpen's "ultimate" grep solution. The below grep command works fantast...
- 14 Aug 2013 11:44
- Forum: DOS Batch Forum
- Topic: Fastest way to extract IP:port occurances any text file?
- Replies: 16
- Views: 21116
Fastest way to extract IP:port occurances any text file?
Im hoping to find the fastest way to extract all occurrences of IP:port in almost any text file using pure batch file (if possible). I tried searching for a solution on google, but didn't find anything. Maybe there needs to be a little help from vbscript or powershell without downloading/installing ...
- 08 Aug 2013 10:10
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Okay, I "think" I was successful in converting my GeoIP to a full macro with arguments. I'm not sure if it's the cleanest way to do it. I just used the existing stringlength counter as a reference. If you guys see any way to make it even cleaner/more efficient, please let me know. Also, I ...
- 06 Aug 2013 22:57
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Penpen/Magialisk: I did what you suggested with taking advantage of for /f "skip=" feature (see code below). Although, this method should be faster, the code didn't appear any more simpler than what I had before. There was an unexpected weird limitation with for /f "skip=0" faili...
- 05 Aug 2013 19:34
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
This was a great learning experience for me guys. One thing I realized... I will be running this batch file regularly against a constantly updating/growing stunnel.log file. It wouldn't make sense to run it against part of the log that has already been processed. So, I added a few more lines of code...
- 03 Aug 2013 22:24
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
@Magialisk the second time you explained how to access the macro, it made much more sense. I was able to follow each change you made; and, comprehend it! I still need to feel comfortable with the full code in it's entirety; so, I can use similar technique in other batch files. I'll always remember y...
- 02 Aug 2013 23:58
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Magialisk, the solution you had posted didn't work correctly (padding didn't work at all); even after I corrected the delayed expansion variable issue. However, I think I understand what you're saying; and, tried my best to apply the IF DEFINED approach. Unfortunately, my attempt to do that introduc...
- 02 Aug 2013 16:33
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
I have bad news and good news: Bad News: We're back to the same issue I had when I started this thread. Although, I have much better padding code now (that works great by itself), it still breaks my main batch file. I get the same exact error that had me pulling my hair out before I started this thr...
- 02 Aug 2013 15:02
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Penpen, the getstringlength subroutine takes relatively long; especially when the batch file runs against a very large log file. Is there any way to avoid having to call :getStringLength twice? Also, I tried my best to use the high performance macros stringlength method (that I posted in the first p...
- 02 Aug 2013 13:57
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Penpen, it doesnt look like your suggested script does what you intended it to do. Either that, or you didn't understand what I'm trying to do. EDIT: After reading my previous post, I can see why you were confused. I had said "stunnelx.log (with padding to equal 170 characters)". I meant (...
- 02 Aug 2013 12:06
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Penpen, I've been thinking and thinking about how your suggested method would apply to my intended scenario; but, I just dont see how it would work. Maximum length = 170 %print% = 07/23/13 10:17:53am Service [stunnel-sslh] connected remote server from: c-24-12-152-129.hsd1.il.comcast.net [24.12.152....
- 02 Aug 2013 10:53
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Hi Penpen, I tried the last script you posted. But, it's giving me an error. ( was unexpected at this time. :: example max padding 200 set "padding= " set "string=Test." :: secure left padding so that the length of padding and string is 200 (only if the string is shorter than 200...
- 02 Aug 2013 10:14
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Hi Penpen, that's the first thing tried to do.. but, unfortunately with what I'm trying to do, I need to be able to control the number of spaces (padding) preceeding the string. So, unfortunately, something like set "leftPadded=%leftPadded:~- %padding% %" Doesn't work. At least it didn't w...
- 02 Aug 2013 08:55
- Forum: DOS Batch Forum
- Topic: Pulling my hair out.. simple stringlen counter breaks script
- Replies: 34
- Views: 30350
Re: Pulling my hair out.. simple stringlen counter breaks sc
Thanks Magialisk! The script works perfectly. There was a small mistake (the !location! variable wasn't showing in stunnelx.log). I sometimes miss delayed variable expansion too. Its seems to be working fine now! BTW: If you (or anyone) can you figure out how to use the "high-performance" ...