util-linux/bash-completion
Fred Mora aefe989338 script: add the -o/--output-limit option. Fix race test.
When script is used on a host with a relatively small free disk space, it
is sometimes desirable to limit the size of the captured output. This
can now be enforced with the --output-limit option.

The --output-limit option lets the user specify a maximum size. The program
uses the size parsing from strutils and thus supports the usual
multiplicative suffixes (kiB, KB, MiB, MB, etc.). After the specified
number of bytes have been written to the output file, the script program
will terminate the child process.

Due to buffering, the size of the output file might exceed the specified
limit. This limit also does not include the start and done messages.

The race test was throwing an error dur to a variable being "" in some cases.
Quoting the variable in the equal test took care of that test.

[kzak@redhat.com: - use done() to stop script
                  - count also timing file
                  - remove unnamed member initialization in ctl struct
                  - add to bash-completion]

Signed-off-by: Fred Mora <fmora@datto.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-05-14 11:32:23 +02:00
..
Makemodule.am rfkill: add bash-completion file 2017-08-30 20:32:49 +01:00
addpart bash-completion: remove unused variables [shellcheck] 2015-06-08 12:09:54 +02:00
blkdiscard bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
blkid bash-completion: make completions to work when bash set -u is in use 2017-07-15 22:05:42 +01:00
blkzone blkzone: add count option to bash-completion 2017-02-24 12:05:13 +01:00
blockdev bash-completion: fix typo in blockdev file 2018-04-06 13:03:38 +02:00
cal bash-completion: add cal --span 2015-11-05 11:34:25 +01:00
cfdisk bash-completion: stop being clever when listing block devices 2014-10-31 10:39:00 +01:00
chcpu bash-completion: fix few bash set -u issues 2018-04-06 13:03:38 +02:00
chfn bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
chmem lsmem/chmem: add memory zone awareness to bash-completion 2017-10-20 12:37:04 +02:00
choom choom: new command to adjust OOM-killer score value 2018-04-16 12:53:39 +02:00
chrt bash-completion: update chrt completion 2016-04-04 10:26:03 +02:00
chsh bash-completion: Invoke actual commands to be completed, not basenames 2014-11-18 13:58:21 +01:00
col bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
colcrt bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
colrm bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
column bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
ctrlaltdel bash-completion: Don't offer any more completions after help or version. 2013-04-08 17:06:52 +02:00
delpart bash-completion: stop being clever when listing block devices 2014-10-31 10:39:00 +01:00
dmesg bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
eject bash-completion: do not print eject --cdspeed error messages 2018-04-06 13:03:38 +02:00
fallocate bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
fdformat bash-completion: update disk-utils 2017-04-17 18:12:10 +01:00
fdisk bash-completion: make completions to work when bash set -u is in use 2017-07-15 22:05:42 +01:00
fincore bash-completion: make completions to work when bash set -u is in use 2017-07-15 22:05:42 +01:00
findfs bash-completion: update misc-utils 2017-04-17 18:18:10 +01:00
findmnt bash-completion: add findmnt --real --pseudo 2018-05-11 10:50:19 +02:00
flock bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
fsck bash-completion: Exclude /dev/fd from fsck find 2017-10-30 14:12:55 -06:00
fsck.cramfs bash-completion: update disk-utils 2017-04-17 18:12:10 +01:00
fsck.minix fsck.minix: introduce long options to the command 2015-07-30 11:39:17 +02:00
fsfreeze bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
fstrim bash-completion: fstrim: use mountpoint, not device 2015-11-13 09:52:14 +01:00
getopt bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
hexdump bash-completion: update text-utils 2017-04-17 18:40:34 +01:00
hwclock bash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock 2017-09-18 11:04:52 +02:00
ionice bash-completion: update schedutils 2017-04-17 18:20:54 +01:00
ipcmk bash-completion: ipcmk: add missing completion file 2016-03-14 13:15:14 +01:00
ipcrm bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
ipcs bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
isosize bash-completion: fsck.cramfs, isosize: find files an argument 2016-03-14 13:15:13 +01:00
last bash-completion: update login-utils 2017-04-17 18:16:24 +01:00
ldattach bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
logger bash-completion: update misc-utils 2017-04-17 18:18:10 +01:00
look bash-completion: look for look completions 2017-08-05 09:58:25 +01:00
losetup losetup: add --output-all option 2018-05-03 19:56:20 +01:00
lsblk bash-completion: fix few bash set -u issues 2018-04-06 13:03:38 +02:00
lscpu lscpu: add --output-all option 2018-05-03 19:56:20 +01:00
lsipc bash-completion: make completions to work when bash set -u is in use 2017-07-15 22:05:42 +01:00
lslocks lslocks: add --output-all option 2018-05-03 19:56:20 +01:00
lslogins lslogins: add --output-all option 2018-05-03 19:56:20 +01:00
lsmem lsmem: add --output-all option 2018-05-03 19:56:20 +01:00
lsns lsns: add --output-all option 2018-05-03 19:56:21 +01:00
mcookie bash-completion: update misc-utils 2017-04-17 18:18:10 +01:00
mesg bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
mkfs bash-completion: remove unused variables [shellcheck] 2015-06-08 12:09:54 +02:00
mkfs.bfs bash-completion: remove unused variables [shellcheck] 2015-06-08 12:09:54 +02:00
mkfs.cramfs bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
mkfs.minix mkfs.minix: introduce long options to the command 2015-07-30 11:39:12 +02:00
mkswap bash-completion: update disk-utils 2017-04-17 18:12:10 +01:00
more bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
mount bash-completion: fix few bash set -u issues 2018-04-06 13:03:38 +02:00
mountpoint bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
namei bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
newgrp bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
nsenter bash-completion: simplify pid listing 2017-08-30 11:21:57 +02:00
partx partx: add --output-all option 2018-05-03 19:56:21 +01:00
pg bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
pivot_root bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
prlimit bash-completion: simplify pid listing 2017-08-30 11:21:57 +02:00
raw bash-completion: Don't offer short options where corresponding long one exists. 2013-04-08 17:06:56 +02:00
readprofile bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
rename bash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock 2017-09-18 11:04:52 +02:00
renice bash-completion: simplify pid listing 2017-08-30 11:21:57 +02:00
resizepart bash-completion: stop being clever when listing block devices 2014-10-31 10:39:00 +01:00
rev bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
rfkill rfkill: add --output-all option 2018-05-03 19:56:21 +01:00
rtcwake bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
script script: add the -o/--output-limit option. Fix race test. 2018-05-14 11:32:23 +02:00
scriptreplay bash-completion: update term-utils 2017-04-17 18:34:14 +01:00
setarch bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
setpriv bash-completion: setpriv --securebits argument can be comma separated list 2018-04-06 13:03:38 +02:00
setsid bash-completion: update sys-utils 2017-04-17 18:26:37 +01:00
setterm bash-completion: update term-utils 2017-04-17 18:34:14 +01:00
sfdisk bash-completion: make completions to work when bash set -u is in use 2017-07-15 22:05:42 +01:00
su bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
swaplabel bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
swapoff bash-completion: use swapon label and uuid listing support 2014-10-31 10:39:01 +01:00
swapon swapon: add --output-all option 2018-05-03 19:56:21 +01:00
taskset bash-completion: fix few bash set -u issues 2018-04-06 13:03:38 +02:00
tunelp bash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock 2017-09-18 11:04:52 +02:00
ul bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
umount bash-completion: (umount) use findmnt, escape a space in paths 2017-11-16 16:27:32 +01:00
unshare unshare: Add --kill-child option. 2017-10-14 04:46:13 +02:00
utmpdump bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
uuidd bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
uuidgen bash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock 2017-09-18 11:04:52 +02:00
uuidparse uuidparse: add bash-completion file 2017-07-15 22:05:00 +01:00
wall wall: check -g GID 2016-12-02 14:11:20 +01:00
wdctl bash-completion: make completions to work when bash set -u is in use 2017-07-15 22:05:42 +01:00
whereis bash-completion: use '\n' as IFS when ask for filenames 2013-09-30 15:49:00 +02:00
wipefs bash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock 2017-09-18 11:04:52 +02:00
write bash-completion: update term-utils 2017-04-17 18:34:14 +01:00
zramctl zramctl: add --output-all option 2018-05-03 19:56:21 +01:00