Skip to content
Advertisement

Tag: trim

Trimming string up to certain characters in Bash

I’m trying to make a bash script that will tell me the latest stable version of the Linux kernel. The problem is that, while I can remove everything after certain characters, I don’t seem to be able to delete everything prior to certain characters. Somehow the output “ignores” the wget=${wget##.tar.xz”>} line. Answer You’re trying remove the longest match of the

Advertisement