All pastes #1915454 Raw Edit

Unnamed

public text v1 · immutable
#1915454 ·published 2010-08-12 00:57 UTC
rendered paste body
if test $1 -eq 10
then

else

fi
-------------------
for a in 'seq 1 20'
do

done
-------------------
#!/bin/bash
clear
echo "No hace falta ser ingeniero para hacer un script"
-------------------
#!/bin/bash
clear
for a in `seq 1 10`
do
temp=$[a*$1]
echo $temp
done
echo
echo "fin del script: " $0



--------------------

#!/bin/bash
clear
for a in `seq 1 10`
do
echo $[a*$1]
done
echo
echo "fin del script: " $0
------------------------

#!/bin/bash
clear
a=1
b=1
i

=3
if test $1 -eq 1 
then 
     echo numero=1
else
   echo numero no es 1
fi
----------------------

#!/bin/bash
clear
n1=1
n2=0
i=1
if test $1 -lt 1
then
   echo "error: numero negativo"
fi
if test $1 -eq 0
then
   echo "fib=0"
fi
if test $1 -eq 1
then
   echo "fib=1"
fi
if test $1 -gt 1
then
   while [ $i -lt $1 ]; do
      nn=$[$n2+$n1]
      n2=$n1
      n1=$nn
      i=$[$i+1]
      #echo "numero "$i", ="$nn
   done
fi
echo "numero "$i", ="$nn

-------------------------
teoria script
> -gt
< -lt
= -eq
<> != -ne
>> -ge
<< -la

v=5
echo $v

---------------------------