langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
8
Task/Filter/UNIX-Shell/filter.sh
Normal file
8
Task/Filter/UNIX-Shell/filter.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
a=(1 2 3 4 5)
|
||||
unset e[@]
|
||||
for ((i=0;i<${#a[@]};i++)); do
|
||||
[ $((a[$i]%2)) -eq 0 ] && e[$i]="${a[$i]}"
|
||||
done
|
||||
|
||||
echo "${a[@]}"
|
||||
echo "${e[@]}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue