|
Posted by Dave (from the UK) on 05/21/06 17:42
Gazza wrote:
> >http://www.althorne.org/witm/witm.php
>
> The use of addslashes() (to sort out the quotes for ReadList) and strpos
> (to check for an occurrence of $ within $cmd) might of some use. I'd
> create a separate little function tidyUp() that can make these checks,
> then pass $cmd to it, before using it in MemoryConstrained[$cmd, ...]
Thanks. I have never used my own functions in php, so I'll take a look
at that.
One problem is that in principle one might want both a $ and a " on the
same line. For example, these commands will find the OS and write it to
a file, then cat the file:
In[4]:= Write["os.txt",$OperatingSystem]
In[5]:= !cat os.txt
"Unix"
To be fair, I can't think of an obvious case of where one would want
this, but I suspect there are cases. There are a huge range of variables
that begin with the $. These are not commands, but give you some
information about the sytem.
In[1]:= ?$*
$ $LaunchDirectory $PipeSupported
$Aborted $LicenseExpirationDate $Post
$AddOnsDirectory $LicenseID $Pre
$AnimationDisplayTitle $LicenseProcesses $PreferencesDirectory
$AnimationFunction $LicenseServer $PrePrint
$Assumptions $Line $PreRead
$BaseDirectory $Linked $PrintForms
$BatchInput $LinkSupported $PrintLiteral
$BatchOutput $MachineDomain $ProcessID
$BoxForms $MachineEpsilon $ProcessorType
$ByteOrdering $MachineID $ProductInformation
$CharacterEncoding $MachineName $ProgramName
$CommandLine $MachinePrecision $RandomState
$ConditionHold $MachineType $RasterFunction
$Context $MaxExtraPrecision $RecursionLimit
$ContextPath $MaxLicenseProcesses $ReleaseNumber
$CreationDate $MaxMachineNumber $RootDirectory
$CurrentLink $MaxNumber $SessionID
$DefaultFont $MaxPiecewiseCases $SetParentLink
$DefaultPath $MaxPrecision $SoundDisplay
$Display $MaxRootDegree $SoundDisplayFunction
$DisplayFunction $MessageList $SoundDisplayTitle
$DisplayTitle $MessagePrePrint $SuppressInputFormHeads
$DumpDates $Messages $SyntaxHandler
$DumpSupported $MinMachineNumber $System
$Echo $MinNumber $SystemCharacterEncoding
$Epilog $MinPrecision $SystemID
$ExportEncodings $ModuleNumber $TemporaryPrefix
$ExportFormats $MotifAnimationFunction $TextStyle
$Failed $NetworkLicense $TimeUnit
$FormatType $NewMessage $TopDirectory
$FrontEnd $NewSymbol $TraceOff
$HistoryLength $Notebooks $TraceOn
$HomeDirectory $NumberMarks $TracePattern
$IgnoreEOF $Off $TracePostAction
$ImportEncodings $OperatingSystem $TracePreAction
$ImportFormats $Output $Urgent
$InitialDirectory $OutputForms $UserAddOnsDirectory
$Input $Packages $UserBaseDirectory
$Inspector $ParentLink $UserName
$InstallationDate $ParentProcessID $Version
$InstallationDirectory $PasswordFile $VersionNumber
$IterationLimit $Path $XPostScriptInterpreter
$Language $PathnameSeparator
--
Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.
Navigation:
[Reply to this message]
|