Further reduce the size of wmic commands
This commit is contained in:
parent
70e88727b6
commit
40366cb55b
7
fetch
7
fetch
|
@ -402,8 +402,7 @@ case "$os" in
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
distro="$(wmic os get Caption /value)"
|
distro="$(wmic os get Caption /value)"
|
||||||
distro=${distro/Caption}
|
distro=${distro/Caption'='}
|
||||||
distro=${distro/'='}
|
|
||||||
distro=${distro//[[:space:]]/ }
|
distro=${distro//[[:space:]]/ }
|
||||||
distro=${distro// }
|
distro=${distro// }
|
||||||
distro=${distro/Microsoft }
|
distro=${distro/Microsoft }
|
||||||
|
@ -900,8 +899,8 @@ getgpu () {
|
||||||
|
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
gpu=$(wmic path Win32_VideoController get caption)
|
gpu=$(wmic path Win32_VideoController get caption /value)
|
||||||
gpu=${gpu/Caption }
|
gpu=${gpu/Caption'='}
|
||||||
gpu=${gpu//[[:space:]]/ }
|
gpu=${gpu//[[:space:]]/ }
|
||||||
gpu=${gpu// }
|
gpu=${gpu// }
|
||||||
;;
|
;;
|
||||||
|
|
Reference in New Issue