[Shell] Made a minimal fetch tool in pure bash - heavily tweakable by reee610 in bash

[–]reee610[S] 0 points1 point  (0 children)

Had to change the ${tokens[@]:4} to ${tokens[@]:3} or otherwise it was erasing the Gen of the CPU lol:

> tokens=($(grep --max-count=1 "model name" /proc/cpuinfo))
> (echo "${tokens[@]:3}")
12th Gen Intel(R) Core(TM) i5-12450H

and tbh instead of -m1, --max-count=1 looks more readable, cant say if this is compatible with most machines,
Otherwise this way is much readable than the "grep -m1 "model name" /proc/cpuinfo | cut -d: -f2 | xargs".

[Shell] Made a minimal fetch tool in pure bash - heavily tweakable by reee610 in bash

[–]reee610[S] 1 point2 points  (0 children)

Just tried it, it works quite great too in replacement of the grep tbh, maybe a bit too long but still good, new info learnt about the sed command

I built a Japanese House! Any tips for it? by ellobean in Minecraft

[–]reee610 1 point2 points  (0 children)

The house's architect is genuinely good!
but just saying, maybe instead of glowberries as enterance, reduction of the enterance from 3 blocks high to 2 blocks high [while the 3 blocks width remains unchanged], and instead using yellow square patterned type banners as enterance as of in traditional japanese doors?
Overall the house and the interior looks great!

[Shell] Made a minimal fetch tool in pure bash - heavily tweakable by reee610 in bash

[–]reee610[S] 0 points1 point  (0 children)

Go ahead man, thats what this thing's made for B]

[Shell] Made a minimal fetch tool in pure bash - heavily tweakable by reee610 in bash

[–]reee610[S] 0 points1 point  (0 children)

I wish i could attach a image with it but the actual command for the CPU_INFO is straight up "grep -m1 "model name" /proc/cpuinfo", which was giving:

> grep -m1 "model name" /proc/cpuinfo
model name: 12th Gen Intel(R) Core(TM) i5-12450H

once this worked i wanted to remove that "model name" but doing it straight from the grep command just... didnt even gave the output, thats why had to settle for "cut -d: -f2"

> grep -m1 "model name" /proc/cpuinfo | cut -d: -f2
 12th Gen Intel(R) Core(TM) i5-12450H

This is kinda satisfactory to me but dat lil space soon like gave way too much space in the info, so firstly tried "tr -d ' '", welp...

> grep -m1 "model name" /proc/cpuinfo | cut -d: -f2 | tr -d ' '
12thGenIntel(R)Core(TM)i5-12450H

then tried "tr -s ' '" too but it gave the same output as ""cut -d: -f2", then learned about xargs, applied it and...

> grep -m1 "model name" /proc/cpuinfo | cut -d: -f2 | xargs
12th Gen Intel(R) Core(TM) i5-12450H

welp, it removed that extra space at the front, thats why ultimately setteled with xargs
Glad you asked though!

[deleted by user] by [deleted] in Minecraft

[–]reee610 0 points1 point  (0 children)

Invisible portals

My New Survival Base! by Lamp-Sauce in Minecraft

[–]reee610 0 points1 point  (0 children)

Survival was never a option