How do I pass a file as an argument in bash scripting?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm a bit confused, so I looked it up, and I found this:
FILE1=$1
wc $FILE1
this is a bit confusing to me, what does assigning the variable expression operator, followed by the number 1 to FILE1, but FILE1 is just a variable, and we're assigning what? The number 1 to the variable expression operator?
How does this work exactly?
What can I do to better understand this concept?
bash
add a comment |Â
up vote
0
down vote
favorite
I'm a bit confused, so I looked it up, and I found this:
FILE1=$1
wc $FILE1
this is a bit confusing to me, what does assigning the variable expression operator, followed by the number 1 to FILE1, but FILE1 is just a variable, and we're assigning what? The number 1 to the variable expression operator?
How does this work exactly?
What can I do to better understand this concept?
bash
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm a bit confused, so I looked it up, and I found this:
FILE1=$1
wc $FILE1
this is a bit confusing to me, what does assigning the variable expression operator, followed by the number 1 to FILE1, but FILE1 is just a variable, and we're assigning what? The number 1 to the variable expression operator?
How does this work exactly?
What can I do to better understand this concept?
bash
I'm a bit confused, so I looked it up, and I found this:
FILE1=$1
wc $FILE1
this is a bit confusing to me, what does assigning the variable expression operator, followed by the number 1 to FILE1, but FILE1 is just a variable, and we're assigning what? The number 1 to the variable expression operator?
How does this work exactly?
What can I do to better understand this concept?
bash
bash
asked 4 mins ago
The_Senate
1
1
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476933%2fhow-do-i-pass-a-file-as-an-argument-in-bash-scripting%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password