Split string with bash with symbol
Using Parameter Expansion: str=”test1@test2″ echo “${str#*@}” The # character says Remove the smallest prefix of the expansion matching the pattern. The % character means Remove the smallest suffix of the expansion matching the pattern. (So you can do “${str%@*}” to get the “test1” part.) The / character means Remove the smallest and first substring of … Read more