Giter Club home page Giter Club logo

Comments (3)

CyberShadow avatar CyberShadow commented on July 17, 2024

If you want to use shell syntax such as | in the shebang, you have to invoke a shell in your shebang. rdmd (nor any other program) can't be expected to implement parsing and execution of shell syntax.

Try something like this:

#!/usr/bin/env -S sh -c 'rdmd "$0" | ffmpeg -f rawvideo -pixel_format rgb24 -video_size 255x255 -i pipe: -preset ultrafast out.mp4'
...

But since you're modifying the D file to specify what to do with the D program's output anyway, you might as well use std.process.pipeProcess.

from tools.

crazymonkyyy avatar crazymonkyyy commented on July 17, 2024

rdmd (nor any other program) can't be expected

I do expect this and apparently, perl at least does something
http://reasonableapproximation.net/2010/07/27/silly-things-to-do-with-shebang-lines.html
and its 30 lines of trivial code

from tools.

CyberShadow avatar CyberShadow commented on July 17, 2024

No, that post describes how to write a script which implements that functionality by invoking the shell. You can do the same thing. Note that there is absolutely nothing special in Perl itself that helps achieve this (other than its affinity for succinct scripts).

from tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.