Modify the script , please help
I have a script which called my_script , it can be used to input one parameter ,
$my_script para1 it works fine in the above case However , if I input more than one parameter like below , $my_script para1 para2 para3 ... it only accept the first one parameter , the para2 , para3 ... is useless in the above case can advise if I want the script can run all parameter one-by-one , that means run para1 first , then para2 , then para3 .... how can I do ? |
Is this a bash, perl, awk, ??? script?
It might also help if post what you've tried this far. |
So the general idea here is you ask us about a script that we have zero idea about. Ask us to change it as it does not do what you want. And provide absolutely no details about the script itself.
Let me just have a quick look at my crystal ball ... I will get back to you. |
Quote:
Kind of similar to this thread: https://www.linuxquestions.org/quest...pt-4175423170/ You've been here NINE YEARS, and keep posting questions like this, without showing any effort on your part. Also, you've been given answers to many similar queries in the past, but don't seem to apply them moving forward. For example: https://www.linuxquestions.org/quest...er-4175413626/ https://www.linuxquestions.org/quest...te-4175413358/ https://www.linuxquestions.org/quest...column-944377/ https://www.linuxquestions.org/quest...script-946113/ As always, we will be happy to HELP you, but you have to show us what you've done/tried, and follow advice given to you. You've been pointed to MANY bash scripting tutorials in the past, ALL of which can answer the question you just asked. Have you referenced ANY of them? |
thanks reply ,
As the script have password in it , I need to remove it before post it . But I think it is no need to post the script as I don't want to change anything of my_script , I just would like to have another script to include (run) my_script rather than modify it . I just would like to run the new script can do my_script para1 , then my_script para2 , then my_script para3 , then ..... Can advise what can I do ? thanks. |
Quote:
If you are not willing to show an effort and advise where you are stuck, other than you can't be bothered, I do not see how we can help further. |
One question ust, your script aways have similar action for all params ?
I thought of something: Code:
|
Code:
bang.sh HTH and Good Luck! |
Quote:
|
Quote:
Quote:
Quote:
|
Quote:
my case is the para name is not the similiar , I do not exactly know the parameter name , so can not be param1 param2 param3 .... |
So read the tutorials and your other threads...been covered there many times.
And again...post your script and we can help. Otherwise, LEARN...after nine years, this should be something you can do. |
Show your code here... can have more easy for help
|
thanks reply ,
I have modified sth , my script is as below , the program name is .c extension , when run program compile , it only compile the first one parameter ( the first program input program name ) , I just would like to compile all programs when input multiple program name . #vi my_script " PROG=/home/ora_tmp/TMP$$.c " program_compile $PROG " " program_compile is a script for compiling program . |
Quote:
|
All times are GMT -5. The time now is 01:32 AM. |