Skip to content

Instantly share code, notes, and snippets.

@Jetchisel
Jetchisel / 31_hold_shift
Last active June 14, 2021 11:48
31_hold_shift
#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#!/bin/bash
shopt -s extglob
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${special_users[@]})"
users=${users%%|}
#!/bin/bash
shopt -s extglob
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${special_users[@]})"
users=${users%%|}
#!/bin/bash
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${special_users[@]})"
users=${users%%|}
#!/bin/bash
mapfile -t special_users < specia_users.txt
printf -v users '%s|' "@(${Online_Users[@]})"
users=${users%%|}
#!/bin/bash
mapfile -t special_users < n.txt
printf -v users '%s|' "@(${Online_Users[@]})"
users=${users%%|}
while read -ra line; do [[ ${line[0]} = @(zion|yaw|creed8) ]] && command wondersharper "${line[1]}" 960 960; done < OnlineUsers
@Jetchisel
Jetchisel / gist:7908004
Last active November 15, 2018 15:18
Some sort of progress output for dd
## Run dd in the background and save it's PID in the pid variable. Increase the bs if needed.
## Replace the "source" and "destination" of course!
dd if=source of=destination bs=4M & pid=$!
## It should give you your shell back. When it does, run the code below.
while ((pid)); do kill -USR1 "$pid" 2>/dev/null || break; sleep 5; done