Comments (9)
first line of paste to be command he executed on pipe
$ bash -xc "uname -s" |& curl -F c=@- https://ptpb.pw/
date: 2019-01-07T01:41:25.538891+00:00
digest: fd7589f1613ca881061dfe6a5f2722c0c3894085
long: AP11ifFhPKiBBh3-al8nIsDDiUCF
short: iUCF
size: 17
status: created
url: https://ptpb.pw/iUCF
uuid: f3ffde45-c452-4ddf-bb12-c8540744a2c2
$ curl https://ptpb.pw/iUCF
+ uname -s
Linux
from pb.
is there an example that doesn't involve shell-quoting?
Sure..
$ bash -x << EOF |& curl -F c=@- https://ptpb.pw/
uname -s
EOF
and the example doesn't work with bash3
ancient/obscure shells are not really interesting, but:
$ bash -xc "uname -s" 2>&1 | curl -F c=@- https://ptpb.pw/
from pb.
Not sure if I understand.
you mean like this?:
$ uname -s | tee >(curl -F c=@- https://ptpb.pw)
Linux
date: 2015-03-05T13:00:31.248000+00:00
digest: cd4bf5db2601ec9075425102d2b12a9ee5413d4a
long: AM1L9dsmAeyQdUJRAtKxKp7lQT1K
short: QT1K
size: 6
status: already exists
url: https://ptpb.pw/QT1K
from pb.
@buhman he wants first line of paste to be command he executed on pipe. i don't think there's good way to do that without extra script.
from pb.
Thanks @buhman , something like that was what I was referring to, similar to what it does: wgetpaste -c
from pb.
the example should be added to docs as well: https://ptpb.pw/
is there an example that doesn't involve shell-quoting?
from pb.
and the example doesn't work with bash3
➔ bash -xc "uname -s" |& curl -F c=@- https://ptpb.pw/
-bash: syntax error near unexpected token `&'
➔ echo $BASH_VERSION
3.2.57(1)-release
from pb.
latest macOS /bin/bash is 3.2.57, so it's not that uncommon and the system itself is not ancient.
not sure why they don't update newer, perhaps GPL v2 -> GPL v3 change in bash license not compatible for re-distribution inside the OS?
from pb.
yep, it's a licensing issue, so system bash 3.2 will stay there: https://apple.stackexchange.com/a/197172
from pb.
Related Issues (20)
- IP upload black/whitelist HOT 1
- Pygments styles not applied propperly for dark background styles HOT 2
- ptpb.pw has AAAA record but address is not reachable HOT 2
- Web form doesn't give usable data HOT 2
- Can we append to an existing url ? HOT 2
- ptpb.pw data retention policy HOT 2
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-x6n4bc2r/ HOT 2
- ptpb.pw is out of disk space HOT 4
- What does "ptpb.pw" mean? HOT 1
- post request header storage and replay HOT 8
- update won't work HOT 1
- ptpb.pw 500 Internal Server Error on uploading png HOT 11
- ptpb.pw permanent shutdown HOT 38
- ModuleNotFoundError: No module named 'werkzeug' when creating new container HOT 6
- building pb from a non-git copy HOT 14
- Site is down HOT 5
- Sqlite Option HOT 3
- Docker-compose deployment HOT 3
- Question: Private paste vs Non-private paste HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pb.