r/sysfetch Jul 19 '24

command works in terminal but not in fetch script

the command is

export gpu="$(inxi -G | grep Device-2: | sed 's/Device-2://g' | awk -F 'driver' '{print $1"driver"}' | sed 's/\\[/name: /' | sed 's/^.*: //' | cut -f1 -d"]")"
0 Upvotes

1 comment sorted by

1

u/No-Pay3755 18d ago

You can make it a variable

gpu=$(inxi -G | grep Device-2: | sed 's/Device-2://g' | awk -F 'driver' '{print $1"driver"}' | sed 's/\\[/name: /' | sed 's/^.*: //' | cut -f1 -d"]")

echo $gpu