1
function awsl {
  echo "arg: $1"
  prfx='arn:aws:sts::'
  pstfx="$1:assumed-role/FOO/justin@bar.com"
  role="$prfx$pstfx"
  echo "role $role"
  saml2aws login --force --profile=default --role=$role
}

$ awsl 414204160037 

arg: 414204160037
awsl:4: no such file or directory: arn:aws:sts::$1:assumed-role/FOO/justin@bar.com=arn:aws:sts::/Users/justin.collum/work/stp-flow/v1/414204160037ssumed-role/FOO/justin@bar.com
role arn:aws:sts::$1:assumed-role/FOO/justin@bar.com

/Users/justin.collum/work/stp-flow/v1/ is my current directory. I don't want it in that string. I thought splitting it up into two strings, one not interpolated, would do it. Tried escaping the :: with :: but that didn't work either.

Zshell on OSX.

Browse other questions tagged or ask your own question.