-
Notifications
You must be signed in to change notification settings - Fork 213
/
outputs
84 lines (67 loc) · 2.3 KB
/
outputs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Explanations:
python file.py & - runs file in background. But if file is giving an output, standard output will be shown on terminal window.
python file.py > /dev/null - Prevents any output from coming on the screen. Redirects the command standard output to the null device, which is a special device which discards the information written to it. This will redirect the standard output - you'll still see errors.
python file.py &> /dev/null - redirects all output including errors.
bash -c "command" - executes the command in bash in non-interactive mode. Prevents a background process from displaying it's PID and DOne message.
Outputs:
nihal@nihal-R510J:~$ python file.py
running
running
running
running
nihal@nihal-R510J:~$ python file.py &
[1] 3088
nihal@nihal-R510J:~$ running
running
running
running
[1]+ Done python file.py
nihal@nihal-R510J:~$ python file.py > /dev/null
no output
nihal@nihal-R510J:~$ python file.py &
[1] 3145
nihal@nihal-R510J:~$ running
running
running
running
[1]+ Done python file.py
nihal@nihal-R510J:~$ python file.py &> /dev/null
no output. But runs on foreground
nihal@nihal-R510J:~$ python file.py &> /dev/null &
[1] 3162
nihal@nihal-R510J:~$
[1]+ Done python file.py &> /dev/null
nihal@nihal-R510J:~$ bash -c "python file.py"
running
running
running
running
nihal@nihal-R510J:~$ bash -c "python file.py &" (Only works when no standard output stream)
nihal@nihal-R510J:~$ running
running
running
running
nihal@nihal-R510J:~$ bash -c "python file.py &> /dev/null"
no output. But runs on foreground.
nihal@nihal-R510J:~$ bash -c "python file.py &> /dev/null &"
Works perfect. No output. And runs in background.
Volume Control:
Using volume.py:
g or empty set of args returns current volume.
"i n" increases volume by n.
"d n" decreases volume by n.
"s n" sets volume to n.
Using command line:
To get current volume:
amixer -c 1 -M -D pulse get Master | grep -o -E [[:digit:]]+%
To increase volume:
amixer -D pulse sset Master 5%+ --quiet
To increase volume:
amixer -D pulse sset Master 5%- --quiet
To mute/unmute:
amixer -D pulse sset Master mute --quiet
amixer -D pulse sset Master unmute --quiet
To reach beyond 100%
pactl set-sink-volume 0 150%
or
pactl set-sink-volume 1 150%