Bash script variable NULL instead of value of expression
Quote:
The second echo generates: Any help would be highly appreciated. |
You just define the variable without set, like so:
Code:
#!/bin/sh |
Hi,
@bdrockwell: If you want to fill a variable with the output of a command: domain="`host 129.74.$i.$j | awk '{print $5}'`" Or domain=$(host 129.74.$i.$j | awk '{print $5}') @Kenny_Strawn: Removing the set part is not enough to fix the problem....... Hope this helps |
In assigments you cannot have spaces around the equal sign:
Code:
domain=`host 129.74.$i.$j | awk '{print $5}'` |
All times are GMT -5. The time now is 01:12 PM. |