0

I need to save an output of a command in a variable and then to use it. Currently.

newExtend= $(awk 'NR=='$cont $directy) 
echo $newExtend
Inian
  • 71,145
  • 9
  • 121
  • 139
  • See also http://stackoverflow.com/questions/2268104/bash-script-variable-declaration-command-not-found – tripleee Oct 03 '16 at 12:37

1 Answers1

-2

Try:

newExtend = `awk 'NR==' $count $directory`

Those are backticks.

AhmadWabbi
  • 2,245
  • 1
  • 21
  • 33
  • Those spaces around the equals sign are a syntax error, and the Awk command is no longer valid, either. – tripleee Oct 03 '16 at 12:36