Skip to content

Instantly share code, notes, and snippets.

@nakamuray
Created February 7, 2019 03:43
Show Gist options
  • Save nakamuray/f70221e02862f6ed526873d3996a1644 to your computer and use it in GitHub Desktop.
Save nakamuray/f70221e02862f6ed526873d3996a1644 to your computer and use it in GitHub Desktop.
#!/bin/sh
# XXX: 雑
mkdir -p ~/.piping
if [ "$1" = "-w" ]; then
mkfifo ~/.piping/"$2" || exit 1
cat > ~/.piping/"$2"
rm ~/.piping/"$2"
elif [ "$1" = "-r" ]; then
cat ~/.piping/"$2"
fi
@nakamuray
Copy link
Author

送信:

$ seq 100 | ssh myserver piping.sh -w aaaa

受信:

$ ssh myserver piping.sh -r aaaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment