Y
Hacker News
new
|
ask
|
show
|
jobs
by
mortenlarsen
1358 days ago
There is no need to call cat to read from a file.
> temp=$(cat /sys/class/thermal/thermal_zone1/temp)
temp=$(</sys/class/thermal/thermal_zone1/temp)
2 comments
0xCAP
1358 days ago
A classic example of cat abuse in my book.
link
elsyx
1357 days ago
Definitely an unwarranted cat call.
link
deeblering4
1357 days ago
meow
link
piperswe
1357 days ago
IMO the cat version is more readable, and any performance difference should be negligible
link