RosettaCodeData/Task/Copy-a-string/AWK/copy-a-string.awk
2023-07-01 13:44:08 -04:00

6 lines
113 B
Awk

BEGIN {
a = "a string"
b = a
sub(/a/, "X", a) # modify a
print b # b is a copy, not a reference to...
}