6votes
Running a script based on raw events from a specific HID?
Does this seem feasible Yes, you can read raw input from the "evdev" interface at /dev/input/event*, either using libevdev or directly from the device nodes, or using the higher-level ...
4votes
Accepted
How can I pick random items from a list, but some more often than others, in a Bash config file?
You can try to weight each cipher with an associated weight using two simple bash arrays, and then generate a tempfile which you can scan later with shuf: #!/bin/bash cipher=("AES256" "...
4votes
Accepted
Creating in Linux files in GB or MB range by various size by read a file
It sounds like you might want to do something like this: $ cat ./tst.sh #!/usr/bin/env bash while read -r idx sfx size; do echo fallocate "file${idx}.${sfx}" "$size" done < ...
4votes
Running a script based on raw events from a specific HID?
Have a look at libinput (you must install libinput-tools With libinput you can detect an events and play action when this events is detected For example here is the output when I'm touching my ...
2votes
How can I pick random items from a list, but some more often than others, in a Bash config file?
If you're just trying to create a shuffled list of "ciphers" with different number of repetitions per cipher then: #!/usr/bin/env bash generate() { while read -r reps cipher; do ...
1vote
Accepted
Running a script based on raw events from a specific HID?
The completed solution for my specific problems ends up being a couple scripts connected to each other. The main one deals with the libinput event log (which is piped into it) and runs the final ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
scripting × 4547bash × 1571
shell-script × 1180
shell × 744
linux × 676
text-processing × 287
awk × 283
sed × 185
files × 178
grep × 138
command-line × 137
ssh × 135
cron × 105
find × 90
variable × 84
ubuntu × 77
terminal × 73
python × 73
rename × 68
perl × 66
ksh × 64
debian × 62
networking × 56
zsh × 54
regular-expression × 54