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
  • 80,270
  • 14
  • 142
  • 161
  • 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,253
  • 1
  • 20
  • 35
  • 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