Open mjross opened 11 years ago
Echo and date are on Windows already. There is no 'ps' command for Windows. Use 'tasklist' instead or create a ps.bat file that points to this command. cal and cmp I've not used nor are familiar with.
cal is the Unix calendar command, and cmp compares the contents of files. Both are quite useful.
Windows date /t simply outputs the date in a static format, while Unix date has all sorts of options and formats, as does its echo.
I'm not sure what tasklist you are referring to, because that is not a Windows command (at least in XP), nor does it appear to be in the list of commands in my Gow installation (and I'm using the latest version).
I have tasklist here:
c:\>which tasklist
C:\WINDOWS\system32\tasklist.EXE
And the output of the command:
c:\>tasklist
Image Name PID Session Name Session# Mem Usage
========================= ====== ================ ======== ============
System Idle Process 0 Console 0 28 K
System 4 Console 0 2,288 K
smss.exe 1716 Console 0 484 K
avgrsx.exe 1852 Console 0 1,652 K
avgcsrvx.exe 1888 Console 0 256 K
csrss.exe 212 Console 0 8,668 K
winlogon.exe 236 Console 0 2,984 K
services.exe 324 Console 0 5,476 K
lsass.exe 336 Console 0 2,160 K
svchost.exe 644 Console 0 5,868 K
svchost.exe 700 Console 0 5,456 K
<snip>
I can look into cal. I can't use date unless I rename it to something like gdate so it doesn't break existing Windows commands.
gdate! The windows date command sucks. and would be extremely useful
+1 here! windows date really sucks!
btw, a workaround with current tools (be sure to add proper quotes and escapes):
awk 'BEGIN { print strftime("%Y%m%d %H%M%S")}'
My thanks also !!
But using bash or running a bash script creates problems
Windows commands are not available in the gow version of bash
start a bash shell ( or try to run a bash shell script ) with "date /t"
I think the current versions of Cygwin/msys bash you can invoke windows commands or windows scripts
I have a shell script that uses "date" it do-not work amigos.
Thanks
note: my tic marks were removed
My bash script uses date for logging and email
I have a work around as follows:
starttime=date 2>/dev/null
if [ $? != 0 ]; then
x1=cmd.exe "/c date /t"
x2=cmd.exe "/c time /t"
starttime="$x1 $x2"
fi
BUT: I have way too many references to the date
to make the above practical
Thus not having "date" is a show stopper
Are there any other ways I can work around this
Hey all, thanks so much for gow, it's great, love having it.
I know this is an old thread, but just in case people are still interested. If you can find an old copy of 4NT, it's a command environment that allows for aliasing. So I have 'll' equal to 'ls -latr' and things like that.
As far as Cal is concerned... That would be so great to have. It's one of the big things, albeit not terribly important, but very convenient, I miss from linux.
cal by itself displays the days of the current month and would highlight the current day.
cal 2017 would display all the months of the year with ea day in ea month.
you could even do cal 1886, which would be bizarre, but yes, it would show ea month and their days for that year.
Thanks for humoring me... really, if you can find 4NT, it can help. :)
Thank you for creating Gow, which looks excellent. But it appears to be missing some commands that are common to most Linux and Unix environments: cal, cmp, date, echo, ps. (I'm just now becoming familiar with Gow, so my apologies in advance if these commands are in fact already present, but under different names, or accessed differently.)