langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 deletions

View file

@ -0,0 +1,3 @@
for file in *.sh; do
echo "filename is $file"
done

View file

@ -0,0 +1,8 @@
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin
oldifs=$IFS
IFS=:
for dir in $PATH; do
echo search $dir
done
IFS=$oldifs

View file

@ -0,0 +1,4 @@
collection=("first" "second" "third" "fourth" "something else")
for x in "${collection[@]}"; do
echo "$x"
done

View file

@ -0,0 +1,4 @@
set -A collection "first" "second" "third" "fourth" "something else"
for x in "${collection[@]}"; do
echo "$x"
done

View file

@ -0,0 +1,4 @@
set collection=(first second third fourth "something else")
foreach x ($collection:q)
echo $x:q
end