Language question -- file =?utf-8?Q?=3D_?=variable ?

Myles Braithwaite me-qIX3qoPyADtH8hdXm2+x1laTQe2KTcn/ at public.gmane.org
Tue Aug 16 19:02:23 UTC 2011


 The closest thing I could think of would be PowerShell:

$a = (get-content counter.txt)
$a + 1 | out-file -encoding ASCII counter.txt

Pash (which is a extremely unfortunate name) is a reimplementation of PowerShell for all OS that support Mono.

-- 
Myles Braithwaite
http://mylesbraithwaite.com | me-qIX3qoPyADtH8hdXm2+x1laTQe2KTcn/@public.gmane.org


On Tuesday, 16 August, 2011 at 10:41 AM, William Park wrote:

> Hi all,
> 
> Is there a language which (natively or not) treats a filename like a variable in memory? For example, to increment a counter stored in a file, you would write something like
>  /tmp/counter = /tmp/counter + 1
> which involves both read and write to a file. If it were normal variable, then it would involve read/write to a memory instead.
> 
> Python is the closest I can think of. But, you need to create a method for read and another method for write. And, typing more verbose than I would like.
> 
> -- 
> 
> William
> --
> The Toronto Linux Users Group. Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists


--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list