I don\'t have a linux at hand and instead use compileonline.com to check out some code in bash, yet I\'m new to bash. Could somebody give a hand?
for var do echo
> always overwrites.
>
Writing a new line would be achieved by using the “append” redirection operator >>.
>>
It overwrites the file each time
$ cat script.sh for var in 123 abv xyz do echo $var > fniz cat fniz done $ ./script.sh 123 abv xyz
If you want to append, use >>