I want to assign a file into a variable inside a shell script; the file name would come from command line argument. For example I want to do something like this:
#!/bin/bash
file1 = $1
file2 = $2
Then I want to read file1
line by line using the variable file1
, but every time I get an error saying permission denied. How do I access the file using the variable name?