I'm no Bash expert and I'm puzzled why my code won't work.
With
od = `pip list --outdated | cut -d ' ' -f 1`; if [ ${#od} -eq 0 ]; then echo 'Up to date'; else echo 'Outdated stuff!'; echo pip install -U $od; fi
I get
od: =: No such file or directory
od: =: Bad file descriptor
-bash: 0: command not found
-bash: [: -neq: unary operator expected
What am I doing wrong here when I try to set the output of test for a list of the names of out of date packages to a variable?