rwxrob / dot

Migrating to z Bonzai stateful command tree monolith
https://github.com/rwxrob/z
Apache License 2.0
242 stars 38 forks source link

yyy можно заменить на sh + tee #62

Closed ghost closed 1 month ago

ghost commented 1 year ago
#!/usr/bin/env bash
> /tmp/buf
while IFS= read -r line;do
  echo "$line" >> /tmp/buf
  echo "$line"
done

превратить в

#!/bin/sh
tee /tmp/buf

tee это POSIX (man 1p tee соглы :)).

rwxrob commented 1 month ago

Sometimes you don't have tee and frankly I wanted pure bash instead of shell out inefficiently.