Search found 15 matches

by Judago
24 May 2016 06:32
Forum: DOS Batch Forum
Topic: Str_math scripts
Replies: 2
Views: 2436

Re: Str_math scripts

Thanks foxidrive! I still love it, it's just a puzzle to me.
by Judago
24 May 2016 01:55
Forum: DOS Batch Forum
Topic: Str_math scripts
Replies: 2
Views: 2436

Str_math scripts

I'm not sure if anyone is interested, but I have updated my str_math.bat along with the bash version . I added exponents, though huge exponents are slow and may hit memory limits for obvious reasons. I haven't extensively tested, but the testing I have done seems to be ok. I'm testing on a xp versio...
by Judago
18 May 2016 09:31
Forum: DOS Batch Forum
Topic: We can use bash in our scripts now in Win10
Replies: 20
Views: 8656

Re: We can use bash in our scripts now in Win10

Hi Squashman, nice to see you too.

Unfortunately I just realized that cmd will spit out unwanted text:

Code: Select all

W:\here\ever>echo -n #   1>nul  & goto batch
by Judago
18 May 2016 08:24
Forum: DOS Batch Forum
Topic: We can use bash in our scripts now in Win10
Replies: 20
Views: 8656

Re: We can use bash in our scripts now in Win10

I'm not sure about win10, but in bash on linux[GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)] this seems to do ok: echo -n # > nul & goto batch A true hyrbrid that is cross platform would also need a shebang, "#!/usr/bin/env bash" of similar. Edit: I just realised that the ...
by Judago
11 Oct 2012 04:48
Forum: DOS Batch Forum
Topic: Fast Division Program
Replies: 9
Views: 4065

Re: Fast Division Program

It will be faster than my scripts for numbers it can handle because I tried to make str_math.bat "just work" with big numbers, floating point and negatives. My division routine is very inefficient, particularly with a large number of decimal places because it just multiplies the first numb...
by Judago
19 Apr 2012 03:08
Forum: DOS Batch Forum
Topic: Tools For Batch
Replies: 5
Views: 2190

Re: Tools For Batch

I would recommend against using "GetStdHandle". When stdout is redirected (like in the "do" part of a for loop) the handle returned is the redirected handle. "CreateFile" can give a direct handle. I wrote some tools myself a while ago, I haven't written anything for a w...
by Judago
23 Mar 2012 21:16
Forum: DOS Batch Forum
Topic: Proposal to set a standard ECHO charactr to show blank lines
Replies: 12
Views: 6334

Re: Proposal to set a standard ECHO charactr to show blank l

Code: Select all

set "echo_=<nul set/p="


It's such a pity that even this has an issue.

Code: Select all

set "echo_=<nul set/p="
%echo_%=
by Judago
11 Feb 2012 03:10
Forum: DOS Batch Forum
Topic: i want to change position of batch file window. how?
Replies: 9
Views: 13278

Re: i want to change position of batch file window. how?

At invocation it's sort of possible. It's not a good solution.... @echo off set title=somewindowtitle set xpos=150 set ypos=150 set /a "pos=(ypos << 16) + xpos" if not "%~1"=="%title%" ( >nul reg add "hkcu\console\%title%" /v WindowPosition /t REG_DWORD /d &qu...
by Judago
20 Jan 2012 05:16
Forum: DOS Batch Forum
Topic: Undocumented FINDSTR features and limitations
Replies: 29
Views: 23010

Re: Undocumented FINDSTR features and limitations

There is a pretty serious bug that is present on xp(haven't tested others). Using more than 15 classes doesn't just result in a text(in console) error message, but the typical windows error popup. echo 01234567890123456|findstr [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0...
by Judago
10 Dec 2011 18:23
Forum: DOS Batch Forum
Topic: "echo," instead of "echo." or "echo\"
Replies: 12
Views: 8150

Re: "echo," instead of "echo." or "echo\"

That is really odd behaviour, I though that not working from the command line was strange enough. I found another one, and it surprises me that it doesn't seem to look for the file. cmd /c echo+ I'm not sure what is causing but it does seem like different parsers treating the delimiters differently.
by Judago
10 Dec 2011 02:57
Forum: DOS Batch Forum
Topic: "echo," instead of "echo." or "echo\"
Replies: 12
Views: 8150

Re: "echo," instead of "echo." or "echo\"

I compiled all of the issues I could find with echo delimiters into a single list with explanations. I know they can all be found on this site(and even this thread), just thought it would be useful to bring them all together. Using a dot will fail if a file named "echo"(no extension) exist...
by Judago
03 Dec 2011 01:33
Forum: DOS Batch Forum
Topic: numbers in variables
Replies: 16
Views: 5322

Re: numbers in variables

Thanks for the example orange_batch, I agree that they are sensible limits. Much easier to incorporate as a specialized workound ;)
by Judago
02 Dec 2011 21:47
Forum: DOS Batch Forum
Topic: numbers in variables
Replies: 16
Views: 5322

Re: numbers in variables

Thanks jeb!

orange_batch, I like the simplified process, I did it in a similar way just a little more long winded. I wouldn't mind seeing the integer splitting technique you mention.
by Judago
01 Dec 2011 01:50
Forum: DOS Batch Forum
Topic: redirection >&1 >&2 >&3 >&4
Replies: 6
Views: 2590

Re: redirection >&1 >&2 >&3 >&4

Actually it's: 0 == StdIn 1 == Stdout 2 == StdErr The reason ">&1" doesn't work is because output redirection defaults from StdOut unless explicitly specified; ">&1" is equivalent to "1>&1". So basically you're trying to redirect a stream to itself. I don't ...
by Judago
04 Nov 2011 08:11
Forum: DOS Batch Forum
Topic: numbers in variables
Replies: 16
Views: 5322

Re: numbers in variables

I wrote a floating point/large number batch script recently(mostly just for the fun of it). Just addition, subtraction, multiplication and division(can be slow). If your interested here it is , I can't guarantee accuracy and it's probably too much code to be really useful. Either way just thought I'...