Skip to content

Instantly share code, notes, and snippets.

@Lesmiscore
Created October 27, 2021 16:04
Show Gist options
  • Save Lesmiscore/e1c7303a10ac8ac241736ac783170b98 to your computer and use it in GitHub Desktop.
Save Lesmiscore/e1c7303a10ac8ac241736ac783170b98 to your computer and use it in GitHub Desktop.
#!/bin/bash
TIME="$1"
shift
( exec "$@" ) &
timeout "$TIME" tail -f /dev/null --pid "$!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment