Link to home
Start Free TrialLog in
Avatar of Jasmin shahrzad
Jasmin shahrzad

asked on

awk sed variable in file

is it possible to use such command in bash file:
 gawk -f load.awk $new_columns.txt > $new_lod.sql
i get error: cannot open .txt file. look like is not possible of i make it wrong.
dosen't matter what load.awk do(it's take first column from $new_columns.txt and rename it(very big file)) and the put it in new file $new_lod.sql
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Try without $:
gawk -f load.awk new_columns.txt > new_lod.sql

Open in new window

$ refers to contents of a variable, your new_columns.txt and new_log.sql very much look like files.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jasmin shahrzad
Jasmin shahrzad

ASKER

it's working. Thank you. it's what i need.