Create executable bash script that accepts drag & drop

前端 未结 3 421
囚心锁ツ
囚心锁ツ 2021-01-04 18:28

I compiled mplayer from source on Ubuntu. I didn\'t want to use a GUI but I wanted to make a executable bash file that gets the path from an file that gets dropped onto the

3条回答
  •  感动是毒
    2021-01-04 19:04

    Try:

    #!/bin/bash
    mplayer "$1"
    

    The file path of the dropped file will be passed to the script file as the 1th command line argument.

提交回复
热议问题