Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Tee?

TCC 11.00.40 Windows Vista [Version 6.0.6002]

I have not used the internal tee command for ages, but today I was
using it and it does not seem to work. For example:

echo xxx | tee x.txt

does not create an x.txt file. But when I do this:

echo xxx | "\Program Files\GnuWin32\bin\tee.exe" x.txt

using an external tee command, it works.
 
> TCC 11.00.40 Windows Vista [Version 6.0.6002]
>
> I have not used the internal tee command for ages, but today I was
> using it and it does not seem to work. For example:
>
> echo xxx | tee x.txt
>
> does not create an x.txt file. But when I do this:
>
> echo xxx | "\Program Files\GnuWin32\bin\tee.exe" x.txt
>
> using an external tee command, it works.

Not reproducible; it works fine here (Vista, Windows 2008, and Windows 7.)

Anybody else able to reproduce this?

Rex Conn
JP Software
 
TCC 11.00.40 Windows Vista [Version 6.0.6002]
TCC Build 40 Windows Vista Build 6002 Service Pack 2

I can not reproduce the problem report, either with or without unicode
output. Tee works as expected for me.

On Sat, Feb 13, 2010 at 5:51 AM, rconn <> wrote:


> ---Quote---
> > TCC 11.00.40 Windows Vista [Version 6.0.6002]
> >
> > I have not used the internal tee command for ages, but today I was
> > using it and it does not seem to work. For example:
> >
> > echo xxx | tee x.txt
> >
> > does not create an x.txt file. But when I do this:
> >
> > echo xxx | "\Program Files\GnuWin32\bin\tee.exe" x.txt
> >
> > using an external tee command, it works.
> ---End Quote---
> Not reproducible; it works fine here (Vista, Windows 2008, and Windows 7.)
>
> Anybody else able to reproduce this?
>
> Rex Conn
> JP Software
>
>
>
>
>



--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
On Sat, 13 Feb 2010 08:51:14 -0500, you wrote:


>---Quote---
>> TCC 11.00.40 Windows Vista [Version 6.0.6002]
>>
>> I have not used the internal tee command for ages, but today I was
>> using it and it does not seem to work. For example:
>>
>> echo xxx | tee x.txt
>>
>> does not create an x.txt file. But when I do this:
>>
>> echo xxx | "\Program Files\GnuWin32\bin\tee.exe" x.txt
>>
>> using an external tee command, it works.
>---End Quote---
>Not reproducible; it works fine here (Vista, Windows 2008, and Windows 7.)
>
>Anybody else able to reproduce this?
>
>Rex Conn
>JP Software

I have done a little more experimenting, and if I start TCMD11 from
the default icon it creates on installation, tee works. If I run it
from the customised icon I have in my ObjectDock Plus dock, tee does
not work. So there is probably something in my INI file that is
causing the problem. That customised icon is set up like this:

Target:
"C:\Program Files\JPSoft\TCMD11\tcmd.exe"
/@C:\Users\Public\Documents\JPSoft\TCMD11.INI

Start in:
"C:\Program Files\JPSoft\TCMD11\"

This is the tcstart.btm file in the C:\Users\Public\Documents\JPSoft\
directory:

@echo off
set jpsoft_path=C:\Users\Public\Documents\JPSoft
iff %_shralias eq 0 then
set SHRALIAS_SAVE_PATH=%jpsoft_path
shralias >&nul:
delay /m 100
alias /r "%jpsoft_path\aliases."
iff exist %jpsoft_path\history.sav then
history /r %jpsoft_path\history.sav
endiff
iff exist %jpsoft_path\dirhistory.sav then
dirhistory /r %jpsoft_path\dirhistory.sav
endiff
iff exist %jpsoft_path\function.sav then
function /r %jpsoft_path\function.sav
endiff
endiff
iff "%dircmd" eq "" then
set dircmd=/a /ogne /p
endiff
rem call brief
cdd c:\

and this is the TCMD11.INI file in C:\Users\Public\Documents\JPSoft\:

[TakeCommand]
DescriptionMax=512
Descriptions=Yes
LinuxSelection=Yes
MinimizeOnClose=No
MouseWheel=Yes
NTFSDescriptions=No
PathExt=No
RegularExpressions=Perl
SettingChange=Yes
SHChangeNotify=Yes
ShowHiddenFiles=Yes
ShowSysFiles=No
ShowSuperHidden=No
SingleClick=No
ShowExtensions=Yes
UpdateTitle=No
Wow64FsRedirection=Yes
ZoneId=0
AlwaysOnTop=No
AppendToDir=Yes
CompleteHidden=Yes
CompletePaths=Yes
IBeamCursor=No
InactiveTransparency=255
ServerCompletion=Local
SingleInstance=No
StatusBarSize=No
StatusBarCPU=No
StatusBarLoad=No
StatusBarDate=No
StatusBarTime=No
Transparency=255
Tray=No
WindowState=Standard
ConsoleBufferRows=5000
LeftAltKey=Yes
LeftCtrlKey=No
RightAltKey=No
RightCtrlKey=No
TabIcons=Yes
Tabs=Top
TabSize=20
TabX=Selected
[4NT]
ANSI=Yes
CDDWinLeft=3
CDDWinTop=3
CDDWinWidth=72
CDDWinHeight=16
PopupWinHeight=12
PopupWinTop=1
PopupWinLeft=40
PopupWinWidth=36
WindowHeight=0
WindowState=Standard
WindowWidth=0
WindowX=0
WindowY=0
Transparency=255
InactiveTransparency=255
AppendToDir=Yes
CompleteHidden=Yes
CompletePaths=Yes
CursorIns=15
CursorOver=100
DirHistory=6144
EditMode=Insert
FuzzyCD=2
HistMin=0
History=12288
HistCopy=No
HistDups=Off
HistMove=Yes
HistWrap=Yes
ServerCompletion=Global
TreePath=C:\Users\Public\Documents\JPSoft
AmPm=No
BeepFreq=440
BeepLength=2
CommandSep=&
DecimalChar=Auto
DescriptionMax=512
NTFSDescriptions=No
Descriptions=Yes
EscapeChar=^
EvalMax=10
EvalMin=0
ExpandPseudovariables=Yes
ParameterChar=$
RegularExpressions=Perl
SwitchChar=/
TabStops=8
ThousandsChar=Auto
Proxy=privoxyg.jsw.gen.nz
ProxyPort=8118
FirewallType=None
PassiveFTP=Yes
FTPTimeout=180
HTTPTimeout=180
TFTPTimeout=180
MailServer=smtpg.jsw.gen.nz
[email protected]
MailPort=25
RLocalPort=0
SSLStartMode=0
SSLPort=0
DebuggerTransparency=255
AutoCancel=No
AutoRun=Yes
BatchAliases=Yes
BatchEcho=Yes
CMDExtensions=No
CopyPrompt=No
DelayedExpansion=No
DelGlobalQuery=Yes
DirJunctions=Yes
DuplicateBugs=Yes
ExecWait=No
HistLogOn=No
LocalAliases=No
LocalDirHistory=No
LocalFunctions=No
LocalHistory=No
LogAll=No
LogOn=No
LogErrors=No
MouseWheel=Yes
NoClobber=No
PathExt=No
Perl=No
Python=No
RecycleBin=No
Rexx=Yes
Ruby=No
SettingChange=Yes
SHChangeNotify=Yes
TCStartPath=C:\Users\Public\Documents\JPSoft
UnicodeOutput=No
UnixPaths=No
UpdateTitle=Yes
Win32SFNSearch=Yes
Wow64FsRedirection=Yes
ZoneId=0
4StartPath=C:\Users\Public\Documents\JPSoft
[Tab1]
TitleCommand="C:\Program Files\JPSoft\TCMD11\tcc.exe"
/@C:\Users\Public\Documents\JPSoft\TCMD11.INI
Directory=C:\Users\Public\Documents\JPSoft\
RunAsPasswordAdmin=0
[Tab2]
TitleCommand="C:\Program Files\JPSoft\TCMD11\tcc.exe"
/@C:\Users\Public\Documents\JPSoft\TCMD11.INI
Directory=C:\Users\Public\Documents\JPSoft\
RunAsPasswordAdmin=0
[Tab3]
TitleCommand="C:\Program Files\JPSoft\TCMD11\tcc.exe"
/@C:\Users\Public\Documents\JPSoft\TCMD11.INI
Directory=C:\Users\Public\Documents\JPSoft\
RunAsPasswordAdmin=0
[Tab4]
TitleCommandDirectoryRunAsPasswordAdmin=0
[Tab5]
TitleCommandDirectoryRunAsPasswordAdmin=0

Does anyone see anything that could be causing this?
 
On Sat, 13 Feb 2010 08:51:14 -0500, you wrote:

This is the tcstart.btm file in the C:\Users\Public\Documents\JPSoft\
directory:

@echo off
cdd c:\

Does anyone see anything that could be causing this?

I notice you don't specify a path for TEE's output file. Any chance it's getting created in C:\? (Or that Windows is trying to create it there, and UAC is preventing it from doing so?)
 
> I have done a little more experimenting, and if I start TCMD11 from
> the default icon it creates on installation, tee works. If I run it
> from the customised icon I have in my ObjectDock Plus dock, tee does
> not work. So there is probably something in my INI file that is
> causing the problem.

Your TCMD.INI works fine with TEE here.

Two things -- if you're running in Vista / Windows 7, make sure you're in a
directory where you're actually allowed to create the tee file. (Try a
"echo foo > bar.txt" and see if that is allowed. If not, you've got
something messing with your file system.)

Second, do a "which tee" to make sure you're actually running the internal
TEE.
 
On Sat, 13 Feb 2010 10:25:52 -0500, you wrote:


>---Quote---
>> I have done a little more experimenting, and if I start TCMD11 from
>> the default icon it creates on installation, tee works. If I run it
>> from the customised icon I have in my ObjectDock Plus dock, tee does
>> not work. So there is probably something in my INI file that is
>> causing the problem.
>---End Quote---
>Your TCMD.INI works fine with TEE here.
>
>Two things -- if you're running in Vista / Windows 7, make sure you're in a
>directory where you're actually allowed to create the tee file. (Try a
>"echo foo > bar.txt" and see if that is allowed. If not, you've got
>something messing with your file system.)
>
>Second, do a "which tee" to make sure you're actually running the internal
>TEE.

I am running with UAC off, so I have no problems with write access to
directories. The external tee can write to the directory and TCC can
write the tee file when run from the standard icon. Doing "echo
xxx>x.txt" works. I had already checked "which tee", and it is using
the internal tee command.
 
On Sat, 13 Feb 2010 10:24:19 -0500, you wrote:


>---Quote (Originally by Stephen Worthington)---
>On Sat, 13 Feb 2010 08:51:14 -0500, you wrote:
>
>This is the tcstart.btm file in the C:\Users\Public\Documents\JPSoft\
>directory:
>
>@echo off
>cdd c:\
>
>Does anyone see anything that could be causing this?
>---End Quote---
>I notice you don't specify a path for TEE's output file. Any chance it's getting created in C:\? (Or that Windows is trying to create it there, and UAC is preventing it from doing so?)

Aha! I found all the files tee was creating in my C:\ directory, even
though the commands were being run in C:\temp\temp. I am running with
UAC off, so there is no problem for any program to write to C:\.

Another test from D:\temp\temp also wrote the tee file to C:\. And
doing "echo xxx | tee .\x.txt" from D:\temp\temp wrote to C:\. Only
if I do "echo xxx | tee d:\temp\temp\x.txt" does it work correctly.

So, why would tee be thinking the current directory is always C:\ and
the current drive is C: ???
 
Aha! I found all the files tee was creating in my C:\ directory, even
though the commands were being run in C:\temp\temp. I am running with
UAC off, so there is no problem for any program to write to C:\.

Another test from D:\temp\temp also wrote the tee file to C:\. And
doing "echo xxx | tee .\x.txt" from D:\temp\temp wrote to C:\. Only
if I do "echo xxx | tee d:\temp\temp\x.txt" does it work correctly.

So, why would tee be thinking the current directory is always C:\ and
the current drive is C: ???

Remember that when you use a pipe, you're starting another instance of TCC. That new instance will in turn run TCSTART.BTM. In your case, that means changing the current directory to C:\

I'd suggest adding a line near the top of your TCSTART.BTM; right after the @ECHO OFF is probably good:

Code:
if %_transient == 1 .or. %_pipe == 1 quit
 
On Sat, 13 Feb 2010 12:38:47 -0500, you wrote:


>---Quote (Originally by Stephen Worthington)---
>Aha! I found all the files tee was creating in my C:\ directory, even
>though the commands were being run in C:\temp\temp. I am running with
>UAC off, so there is no problem for any program to write to C:\.
>
>Another test from D:\temp\temp also wrote the tee file to C:\. And
>doing "echo xxx | tee .\x.txt" from D:\temp\temp wrote to C:\. Only
>if I do "echo xxx | tee d:\temp\temp\x.txt" does it work correctly.
>
>So, why would tee be thinking the current directory is always C:\ and
>the current drive is C: ???
>---End Quote---
>Remember that when you use a pipe, you're starting another instance of TCC. That new instance will in turn run TCSTART.BTM. In your case, that means changing the current directory to C:\
>
>I'd suggest adding a line near the top of your TCSTART.BTM; right after the @ECHO OFF is probably good:
>
>
>Code:
>---------
>if %_transient == 1 .or. %_pipe == 1 quit
>---------

Yes, that was it. Your fix works well, thank you.
 
Back
Top
[FOX] Ultimate Translator
Translate