access-ci-org / Jetstream_Cluster

Scripts and Ansible Playbooks for building an HPC-style resource in Jetstream
MIT License
19 stars 16 forks source link

Cicada Dennis - added quotes around variable name, so awk doesn't cho… #3

Closed CicadaDennis closed 4 years ago

CicadaDennis commented 4 years ago

…ke if the variable has spaces in it.

CicadaDennis commented 4 years ago

Yes, it did cause a problem. That is how I came across the issue. That is because the string that was being sent to awk as an argument looked like the following (on my Mac):

1024 MD5:a7:dd:aa:4b:6a:36:e4:c0:a0:06:75:ee:5b:18:41:17 no comment (RSA)

and that doesn't work in the awk command without the quotes.

ECoulter commented 4 years ago

Ahhhh, so it's an implementation mismatch between our 'sed's. I'm on Ubuntu, using GNU sed and GNU awk, both of which are drastically different from what's on OSX.

I completely forgot about this sort of thing... I'll have to go through and POSIX-up all my sed/awk commands in the headnode_create.