Goonstation Forums
Minor DWAINE append bug - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: Bug Reports (https://forum.ss13.co/forumdisplay.php?fid=9)
+--- Thread: Minor DWAINE append bug (/showthread.php?tid=11619)



DWAINE append bug - Zamujasa - 02-21-2019

Generally, "^" is the "append to file" operator (like ">" in Linux).

You can use it to create multi-line files:

Code:
>echo line 1 ^ test
>echo line 2 ^ test
>cat test
]line 1
]line 2
]


You can also do that with |n, but it can get a bit ugly in some cases:
Code:
>echo line 1|nline 2 ^ test2
>cat test2
]line 1
]line 2
]


However, it seems that if you try appending to a program like this, it runs the program instead of running the command and appending it:
Code:
>echo #! ^ test3
>echo echo test 1 ^ test3
>echo echo test 2 ^ test3
]test 1
]
>cat test3
]#!
]echo test 1
]


Also, echo's help topic suggests you can try piping, but it doesn't seem to work at all:


Code:
>cat out
]~
]
>echo "this is some words" | out
]Unable to pipe stream to file.
>man echo
]Echo: Print text to current stream. Stream defaults to standard output (User terminal screen) if not piping.
]If piping, output is passed on. If the piping target is not an executable, an attempt will be made to write to that file.
]Usage: echo "text" OR echo "text" | pipe_file_name



RE: DWAINE append bug - Zamujasa - 02-23-2019

Blank lines in a DWAINE script cause the entire script to halt (treated as a break) as opposed to just being skipped/ignored. Combined with the fact that cat and echo love to insert additional new lines to text and it can make editing scripts extremely difficult