Skip to main content
added 2 characters in body
Source Link
Stéphane Chazelas
  • 587k
  • 96
  • 1.1k
  • 1.7k

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

However, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive), as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the positionpositional parameters, not variables.

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

However, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive), as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the position parameters, not variables.

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

However, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive), as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the positional parameters, not variables.

added 36 characters in body
Source Link
Stéphane Chazelas
  • 587k
  • 96
  • 1.1k
  • 1.7k

In the rc shellrc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

However, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive), as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the position parameters, not variables.

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

However, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive), as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the position parameters, not variables.

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

However, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive), as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the position parameters, not variables.

added 145 characters in body
Source Link
Stéphane Chazelas
  • 587k
  • 96
  • 1.1k
  • 1.7k

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

InHowever, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive) however note, as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the position parameters, not variables.

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

In Byron Rakitzis' clone of rc for Unix (from which es/akanga derive) however note that for those that contain characters outside of a-zA-Z0-9_, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the position parameters, not variables.

In the rc shell or derivatives (es, akanga), just about anything can be used in a variable name.

All variables are also exported to the environment.

However, in Byron Rakitzis' clone of rc for Unix (from which es/akanga derive), as opposed to the port of plan9 rc (now publicly available since plan9 has been released as FLOSS), note that for those that contain characters outside of a-zA-Z0-9_ or sequences of two or more underscores, an encoding/decoding is used upon export/import from the environment:

$ rc
; foo-bar = baz
; echo $'foo-bar'
baz
; printenv foo-bar
; env | grep foo
foo__2dbar=baz

In Byron's rc, one also can't use a variable with an empty name:

; '' = 1
rc: zero-length variable name

Things like 1 = foo or * = (foo bar) work, but they set the position parameters, not variables.

Source Link
Stéphane Chazelas
  • 587k
  • 96
  • 1.1k
  • 1.7k
Loading