Answer the question
In order to leave comments, you need to log in
How to take parameters to run a script from a text file?
Let's say I have a simple test.st script that displays everything that is given to it in the first parameter
#!/bin/bash
echo $1
There is a test.txt file in which "123" is written.
I execute ./test.sh 123 I get 123 I
execute cat test.txt | ./test.sh get nothing.
My script is not formatted correctly, or do I need to redirect in the wrong way?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question