test.sh

#!/bin/bash
for skill in Ada Coffe Action Java; do
    echo "I am good at ${skill}Script"
done

输出

bogon:Desktop macname$ ./test.sh 
I am good at AdaScript
I am good at CoffeScript
I am good at ActionScript
I am good at JavaScript

 

 

参考:

https://runoob.com/linux/linux-shell-variable.html

 

相关文章:

  • 2021-08-30
  • 2022-12-23
  • 2022-02-21
  • 2021-04-21
猜你喜欢
  • 2021-11-20
  • 2021-10-31
  • 2021-09-25
  • 2022-01-15
相关资源
相似解决方案