Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#!/bin/bash #script to embed an mp3 into a shell script. #Usage: #cat thisScript.sh mp3FileName.mp3 > play.sh #bash play.sh ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0` #redirect embedded archive to a file. #specificly, read the script, get the number of lines before ARCHIVE_BELOW, and redirect after that to a file tail -n+$ARCHIVE $0 > file.mp3 #play the file once and exit cvlc --play-and-exit --ignore-config file.mp3 rm file.mp3 exit 0 __ARCHIVE_BELOW__
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)