Академический Документы
Профессиональный Документы
Культура Документы
emacs) or vi
Down to the left you find the console which is the shell program console or the
bash or terminal program and command line to the system.
File Creations
File Viewing
File manipulaton
Console Programming
cd Desktop
touch shellscript
chmod 777 shellscript
pico shellscript
-----------------------------------------------------------------------------------
------------------------------------
#!/bin/bash Header saying this is a shell script
tmp=5
echo $tmp
-----------------------------------------------------------------------------------
------------------------------------
-----------------------------------------------------------------------------------
-------------------------------------
#!/bin/bash
for i in *
do
echo $i
done
-----------------------------------------------------------------------------------
--------------------------------------
./shellscript Prints out all ls files
pico shellscript
-----------------------------------------------------------------------------------
--------------------------------------
piovertwo=`echo 5 k 3.14 2.0 \/ p | dc` 5 decimal places postfix and pop stack
on desktop calc
echo $piovertwo
-----------------------------------------------------------------------------------
---------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------
#!/bin/bash
threeovertwo= `expr 3/2`
echo $threeovertwo
-----------------------------------------------------------------------------------
---------------------------------------
-----------------------------------------------------------------------------------
--------------------------------------
#!/bin/bash
who= `echo | whoami`
echo $who
-----------------------------------------------------------------------------------
----------------------------------------
pico shellscript
-----------------------------------------------------------------------------------
----------------------------------------
#!/bin/bash
touch testfromscript
chmod 555 testfromscript
cp testfromscript tfs2
ls -a
-----------------------------------------------------------------------------------
----------------------------------------