Search found 227 matches

by taripo
29 Dec 2017 00:16
Forum: DOS Batch Forum
Topic: Why use > at beginning of command line
Replies: 9
Views: 7941

Re: Why use > at beginning of command line

I suppose those are some reason to do it but when considering readability it's worth considering how convention can make things easier to recognise/read. I think there are many reasons why putting it afterwards is clearer.. A)The convention most people use is putting it afterwards.. the first time I...
by taripo
28 Dec 2017 23:45
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 12172

Re: weird error from gnuwin32 head, seems pipe related

I am very sorry to hear that.

His technical posts were of great benefit.

He will be missed.
by taripo
27 Dec 2017 21:04
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 12172

Re: weird error from gnuwin32 head, seems pipe related

I don't think he understood you penpen. His reply would have been more descriptive about his problem. Hmm not sure why I didn't get notified of the reply to this thread at the time, but was just checking back on this topic now to refresh my memory on penpen's findstr workaround, and saw that there ...
by taripo
14 Dec 2017 16:58
Forum: DOS Batch Forum
Topic: quickly write a large file?
Replies: 2
Views: 3259

Re: quickly write a large file?

thanks
by taripo
12 Dec 2017 03:07
Forum: DOS Batch Forum
Topic: quickly write a large file?
Replies: 2
Views: 3259

quickly write a large file?

Hi How can I quickly write a large file where each line has the string "aaa"? this method is slow I let it run for about 20 seconds and stopped it 'cos it was slow and it wrote maybe 20,000 lines far from 200,000 C:\blah>for /L %f in (1,1,200000) do @echo aaa >>abigfile1.txt I could write a program ...
by taripo
21 Mar 2017 15:17
Forum: DOS Batch Forum
Topic: can anybody demonstrate the pipe creates new instance of cmd, issue?
Replies: 5
Views: 6317

Re: can anybody demonstrate the pipe creates new instance of cmd, issue?

it seems to create two command processes pause>nul|set /p=sdf seems to be creating two cmd processes So if I open a cmd.exe window, I have one showing in task manager then I run that and I get 3 running. So it created two. why? I notice that pause or pause>nul, doesn't create a cmd process. So it se...
by taripo
21 Mar 2017 10:49
Forum: DOS Batch Forum
Topic: can anybody demonstrate the pipe creates new instance of cmd, issue?
Replies: 5
Views: 6317

can anybody demonstrate the pipe creates new instance of cmd, issue?

I've often heard that pipes create a new instance of cmd..

I don't see it though

If I go to e.g. the windows directory and I do dir /p | more, then I don't see a new cmd.exe instance appear in task manager.

i'm also interested in when that has ramifications that some might not foresee.

thanks
by taripo
18 Oct 2016 03:20
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 12172

Re: weird error from gnuwin32 head, seems pipe related

Thanks, that was very informative.

In what programming language(s) have you had the experience of creating pipe objects?

Was the environment *nix or windows, and were there big differences?
by taripo
16 Oct 2016 16:46
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 12172

Re: weird error from gnuwin32 head, seems pipe related

thanks.. (I think I figured out exactly what's going on but mid post.. though i'm still not 100% if my conclusions are totally correct) i'm trying to figure out what's going on with this command you have that works.. Z:\>type testfile | grep "." | (head -n 1 & findstr /v "^")...
by taripo
15 Oct 2016 15:06
Forum: DOS Batch Forum
Topic: non gnuwin32 alternative to head?
Replies: 5
Views: 6702

non gnuwin32 alternative to head?

What methods are there for me to display the first n lines of a file, it seems there is a bug in piping to gnuwin32 head and gnuwin32 sed http://www.dostips.com/forum/viewtopic.php?f=3&t=7480 (I can use them without pipe as then they won't run into the bug, but i'd like commands that I can pipe ...
by taripo
15 Oct 2016 14:33
Forum: DOS Batch Forum
Topic: weird error from gnuwin32 head, seems pipe related
Replies: 10
Views: 12172

weird error from gnuwin32 head, seems pipe related

So the for statement generates a file.. Grep is like the windows find command. The "." is not current directory, it's a regex pattern (like findstr uses). It means any character I think i've narrowed it down to head rather than grep or some combination of head and grep.. Though interesting...
by taripo
10 Aug 2015 07:19
Forum: DOS Batch Forum
Topic: Get Free Ram in MB & save it to a variable
Replies: 5
Views: 5451

Re: Get Free Ram in MB & save it to a variable

further to my last post, here's how you do it in a nutshell using 3rd party tools of sed and grep C:\blah>tasklist>a.a C:\blah>del b.b C:\blah>for /f "tokens=5 delims= " %f in (a.a) do @echo %f >>b.b C:\blah>sed "s/,//" b.b>c.c C:\blah>grep -P "^\d+" c.c>d.d C:\blah>set...
by taripo
10 Aug 2015 06:57
Forum: DOS Batch Forum
Topic: Get Free Ram in MB & save it to a variable
Replies: 5
Views: 5451

Re: Get Free Ram in MB & save it to a variable

well, tasklist will list chrome.exe 6604 Console 1 341,108 K chrome.exe 4220 Console 1 74,548 K chrome.exe 7256 Console 1 52,876 K chrome.exe 8084 Console 1 35,156 K vncviewer.exe 8056 Console 1 23,904 K It's possible an administrative cmd prompt lists more.. one would have to check.. I am not sure ...
by taripo
07 Aug 2015 02:30
Forum: DOS Batch Forum
Topic: DOS source code < 1MB and Downloadable
Replies: 1
Views: 2741

DOS source code < 1MB and Downloadable

m " the Computer History Museum is pleased to make available the source and object code to Microsoft’s MS-DOS operating system versions 1.1 and 2.0, for non-commercial use. The zip file contains four subdirectories: v11source: 7 assembler code files, and an explanatory email from Tim Paterson v...