Language question -- file = variable ?
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Aug 16 19:26:19 UTC 2011
On Tue, Aug 16, 2011 at 03:02:23PM -0400, Myles Braithwaite wrote:
> 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.
bash (but not likely posix shell):
x=`cat counter.txt`
echo $((++x)) > counter.txt
--
Len Sorensen
--
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