Search found 129 matches
- 23 Jul 2016 04:52
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2009469
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
Ok, I'm back with another problem This one is not crucual as I have a work-a-round but it is far from ideal. This is more of a jscript regex question. I want to parse the output from this: C:\>icacls "c:\Program Files\Common Files" c:\Program Files\Common Files NT SERVICE\TrustedInstaller:...
- 20 Jul 2016 20:02
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2009469
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
But why do you need us to tell you that. All you need to do is prepare a file with traditionally "problem" characters, and see how the various solutions handle it. I suppose I am just looking to experienced users to advise me of any known limitations/issues I may encounter. DOS batch char...
- 20 Jul 2016 18:10
- Forum: DOS Batch Forum
- Topic: heredoc in batch
- Replies: 5
- Views: 9111
Re: heredoc in batch
it doesn't work because you try to call the script by name and extension .bat. Try the same without extension.
Thank you siberia-man, it is working now.
- 20 Jul 2016 18:08
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2009469
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
I'd guess it depends on how those characters are being sent to Jrepl. Right now, I am only extracting sections of text from within files. And I am just looking for a consistent, reliable method that will work for all characters. I'd like to avoid tweaking the method and/or text format (i.e. escapin...
- 19 Jul 2016 17:41
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2009469
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
jrepl ":SQLFile_Begin\s*?\n([\s\S]*?)\r?\n:SQLFile_END" $1 /m /jmatch /f "%~f0" | jrepl "%%(.*?)%%" "env($1)?env($1):$0" /j /o "output.sql" This works perfect - thank you. Now for an advice question: I have some other scenarios where I need to gener...
- 19 Jul 2016 17:10
- Forum: DOS Batch Forum
- Topic: heredoc in batch
- Replies: 5
- Views: 9111
Re: heredoc in batch
Thank you for the reply. I've downloaded the file from the link you sent and the errors are now gone but it doesn't seem to work as expected: @ECHO OFF CALL heredoc.bat :testlabel1 & GOTO :testlabel1 SET DataFile=users.txt @ECHO BEGIN --------------------------------------------- :SQLFile_Begin ...
- 18 Jul 2016 19:50
- Forum: DOS Batch Forum
- Topic: Can anyone find the problem with this simple code?
- Replies: 2
- Views: 3076
Re: Can anyone find the problem with this simple code?
I didn't look deeply at all but replace ) with ^) when you echo them within parentheses.
That fixed it - thanks.
- 18 Jul 2016 17:37
- Forum: DOS Batch Forum
- Topic: Can anyone find the problem with this simple code?
- Replies: 2
- Views: 3076
Can anyone find the problem with this simple code?
It is probably a simple problem with parentheses ")" but I can't figure out exactly where the problem lies: @ECHO OFF SET "tmpImport1=dataRaw_Shares.txt" SET "tmpSQLImport1=Insert_Shares.sql" ( @ECHO DELETE FROM Shares; @ECHO DROP TABLE IF EXISTS tmpDataInsert; @ECHO CR...
- 18 Jul 2016 17:32
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2009469
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
Ok, I'm back with another question I'm trying to find an easy/standardized way to generate a few .sql files. Right now there is only one [%var%] that needs to be expanded. In the "printhere" and "heredoc" threads, I've been trying those solutions but none are perfect for what I n...
- 18 Jul 2016 17:14
- Forum: DOS Batch Forum
- Topic: heredoc in batch
- Replies: 5
- Views: 9111
Re: heredoc in batch
Hello Siberia-man, I was attempting to use your heredoc.bat but am not able to get it to work: @ECHO OFF @ECHO BEGIN --------------------------------------------- CALL heredoc.bat :testlabel1 & goto :testlabel1 DELETE FROM Users; DROP TABLE IF EXISTS tmpDataInsert; CREATE TEMP TABLE IF NOT EXIST...
- 18 Jul 2016 16:38
- Forum: DOS Batch Forum
- Topic: PrintHere.bat - an emulation of the unix here doc feature
- Replies: 2
- Views: 8193
Re: PrintHere.bat - an emulation of the unix here doc feature
Hi Dave, I know this is an older thread but I was trying out this utility and found a couple of issues in case you are interested: Issue #1: Empty lines are not echoed correctly if trimming spaces/tabs (or maybe all characters) @ECHO OFF @ECHO BEGIN --------------------------------------------- CALL...
- 01 Jul 2016 23:16
- Forum: DOS Batch Forum
- Topic: ECHO ON / OFF behavior within a loop
- Replies: 2
- Views: 5243
ECHO ON / OFF behavior within a loop
Does a FOR loop disable ECHO ON / OFF functionality, or "delay" it? Running this code looks like it should produce some screen output but I get nothing: @echo off & setlocal enableDelayedExpansion for /f "tokens=1,2 delims=: " %%A in ( 'ipconfig /all ^| jrepl "%srcIP%[\s...
- 01 Jul 2016 23:00
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2009469
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
Dave, thank you for the examples, they help out a lot. They both work great. I modified the 1st example to pull DNS servers associated with a specific IP: FOR /F "usebackq tokens=3,4" %%a IN (`route print 0.0.0.0 ^|findstr /C:"0.0.0.0"`) DO ( SET srcIP=%%b ) for /f "tokens=1...
- 01 Jul 2016 21:19
- Forum: DOS Batch Forum
- Topic: ChangeMACAddressBatch script
- Replies: 1
- Views: 4500
Re: ChangeMACAddressBatch script
Thank you for posting your script for us all. I currently do not have a use for it but will keep it in my library.
- 01 Jul 2016 18:23
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 2009469
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
1. There can be more than one set of DNS servers in ipconfig /all such as belonging to other network items. Are you aware of that? You are right of course - and I did not take this into consideration. For now I think there is only one adapter on each box where this will run. I'll worry about multip...