I am using the CLI and the determined library, and I want to find if a certain Username exists.
I tried the commands below, but I dont get the line printed although I’m sure the Username exists.
Assume the username is xyz
, and the column name is Username
(other columns are User Id
etc.)
det user ls | grep -E "^Username: (${xyz})$”
det user ls | awk "/Username: ${xyz}$/ {print $0}"
det user ls | awk '$3 == “xyz”’
I use $3
because it is the third column.
just to be clear, det user ls
does work!
I’d like it to be a one liner and not a script (to avoid uploading to the system).
I guess there is an issue with the logic? or I’m doing the search wrong?
thanks in advance