Skip to main content

Thread: How to enter many variables into a bash script?


hi
if have script this:-

code:
#!/bin/bash  sentence=$1" "$2" "$3  echo $sentence
i run this:-
code:
./script.sh black cat
it gives correct output:- the black cat

but, if sentence doesn't contain 3 words.
method used if number of words in sentence changes each time?

the variable looking $@

it's buried deep down in manual bash can find if know exists.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help How to enter many variables into a bash script?


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account