-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsysinfo.sh
More file actions
77 lines (67 loc) · 2.39 KB
/
Copy pathsysinfo.sh
File metadata and controls
77 lines (67 loc) · 2.39 KB
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
#!/usr/bin/env bash
section() { printf "\n== %s ==\n" "$1"; }
kv() { printf "%-14s : %s\n" "$1" "$2"; }
section "System"
kv "Host" "$(hostname)"
kv "User" "$USER"
kv "OS" "$(uname -s)"
kv "Date" "$(date)"
chmod +x sysinfo.sh
== System ==
Host : DESKTOP-ULF03JM
User :
OS : MINGW64_NT-10.0-19045
Date : Wed Sep 17 00:09:46 EAST 2025
section "Disk"
df -h | head -n 6 # limit output to first few lines
chmod +x sysinfo.sh
== System ==
Host : DESKTOP-ULF03JM
User :
OS : MINGW64_NT-10.0-19045
Date : Wed Sep 17 00:13:00 EAST 2025
./sysinfo.sh: line 13: ==: command not found
./sysinfo.sh: line 14: Host: command not found
./sysinfo.sh: line 15: User: command not found
./sysinfo.sh: line 16: OS: command not found
Date: extra operand ‘Wed’
Try 'Date --help' for more information.
== Disk ==
Filesystem Size Used Avail Use% Mounted on
C:/Program Files/Git 239G 172G 67G 73% /
echo "Date: $(date)"
== System ==
Host : DESKTOP-ULF03JM
User :
OS : MINGW64_NT-10.0-19045
Date : Wed Sep 17 10:23:48 EAST 2025
./sysinfo.sh: line 13: ==: command not found
./sysinfo.sh: line 14: Host: command not found
./sysinfo.sh: line 15: User: command not found
./sysinfo.sh: line 16: OS: command not found
Date: extra operand ‘Wed’
Try 'Date --help' for more information.
== Disk ==
Filesystem Size Used Avail Use% Mounted on
C:/Program Files/Git 239G 172G 67G 73% /
./sysinfo.sh: line 24: ==: command not found
./sysinfo.sh: line 25: Host: command not found
./sysinfo.sh: line 26: User: command not found
./sysinfo.sh: line 27: OS: command not found
Date: extra operand ‘Wed’
Try 'Date --help' for more information.
./sysinfo.sh: line 29: ./sysinfo.sh:: No such file or directory
./sysinfo.sh: line 30: ./sysinfo.sh:: No such file or directory
./sysinfo.sh: line 31: ./sysinfo.sh:: No such file or directory
./sysinfo.sh: line 32: ./sysinfo.sh:: No such file or directory
./sysinfo.sh: line 33: Date:: command not found
./sysinfo.sh: line 34: Try: command not found
./sysinfo.sh: line 36: ==: command not found
./sysinfo.sh: line 37: Filesystem: command not found
./sysinfo.sh: line 38: C:/Program: No such file or directory
Date: Wed Sep 17 10:23:49 EAST 2025
echo "== System Info =="
echo "Host: $(hostname)"
echo "User: $USER"
echo "OS: $(uname -o)"
echo "Date: $(date)"