Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザー入力変数($ userinput)は値と比較できますか?
awk -F: '$1 < $userinput { printf .... }'
この比較式は私には問題ないように見えますが、エラーが発生しますか?
これを試してみてください:
awk -vuserinput="$userinput" -F: '$1 < userinput {}'
実際の例:
read -p "Give me an integer >>> " int awk -v input=$int '$1 < input {print $1, "is less than", input}' <<< 1