summaryrefslogtreecommitdiffstats
path: root/test/bashisms/jobs.sh
blob: 9e2df54bc54c07781d2f84904e66bc5414bdb272 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# POSIX+UP:
jobs # BASHISM
jobs -l # BASHISM
jobs -p # BASHISM

# Non-POSIX at all:

sleep 10 &
j=$(jobs -p) # possible BASHISM (context changes because of subshell)
jobs -r # BASHISM
jobs -s # BASHISM
jobs -n # BASHISM
jobs -x # BASHISM