Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux shell ½Å±¾ µ÷ÓÃÊý¾Ý¿â

×î½üÒ»Ö±ÔÚæÏîÄ¿£¬×öµÄ¹ý³ÌÖÐÓöµ½Ò»¸öºÜ¾À½áµÄÊÂÇé¡£ÐèÒªÓÃshell½Å±¾ÂÖѵÊý¾Ý¿â£¬Êý¾ÝÖ´ÐÐÍê±ÏÒÔºó²ÅÄܵ÷ÓÃÆäËûµÄshell½Å±¾¡£ÔÚÕâÀï×ܽáһϣ¬Óë´ó¼Ò¹²Ïí¡£
½Å±¾ÈçÏ£º
shell ½Å±¾ÈçÏ£º
#!/bin/sh
SQL_DIR=/home/tang/tek/sql/tek
SHELL_DIR=/home/tang/tek/sh/tek
LOG_DIR=/home/tang/tek/logs
. /home/tang/.bash_profile
#$SHELL_DIR/runsql.sh /home/tang/tek/sh/tek/test.sql > test.txt
log_check=1
checkCount=0
while [[ $log_check -ne 0 ]]; do
   newlog_check=`sqlplus -s/nolog Óû§Ãû/ÃÜÂë@Sid<<-EOF
    set heading off feedback off pages 0
     select count(*)
    from tek.admin_user sn
   where sn.name is null
    exit
EOF`
log_check=$newlog_check
echo "log check value is:" $log_check
let checkCount=$checkCount+1
if [ $checkCount -gt 2 ]; then
          sqlplus -s/nolog Óû§Ãû/ÃÜÂë@Sid<<-EOF
     update tek.user_info bm set bm.name=0 where bm.name='tangpengtao';
commit;
        exit
EOF
let checkCount=0
fi
   echo $checkCount
#ÐÝÃß3Ãë¡£ÔÙÂÖѵ 
  sleep 3
done
. $SHELL_DIR/tpt.sh
 
 linuxÏ°²×°Ò»¸ö¿Í»§¶Ë¡£²½ÖèÈçÏ£º
1.´´½¨Óû§
#groupadd dba
#useradd -d /usr/local/oracle -g dba oracle
#passwd oracle
2.½âѹÈí¼þ
#gunzip ship_9204_linux_disk1.cpio.gz
#gunzip ship_9204_linux_disk2.cpio.gz
#gunzip ship_9204_linux_disk3.cpio.gz
#cpio -idvm < ship_9204_linux_disk1.cpio
#cpio -idvm < ship_9204_linux_disk2.cpio
#cpio -idvm < ship_9204_linux_disk3.cpio
#cp -rf Disk1 /usr/local/oracle
#cp -rf Disk2 /usr/local/oracle
#cp -rf Disk3 /usr/local/oracle
3.´ò²¹¶¡
#unzip p3006854_9204_LINUX.zip
#cp -rf 3006854 /usr/local/oracle
#sh /usr/local/oracle/3006854/rhel3_pre_install.sh
4.ÅäÖÃoracleÓû§»·¾³±äÁ¿
$vi .bash_profileÄÚÈÝÈçÏ£º
# .bash_profile
 
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/


Ïà¹ØÎĵµ£º

linuxÏ´´½¨ftpÓû§

1¡¢ÔÚftpÓû§×éÖÐÌí¼ÓÓû§£¬ÇÒÖ¸¶¨Óû§µÄĿ¼
     #useradd -G ftp
-d Ŀ¼
-M ̞
2¡¢¸øÓû§Ìí¼ÓÃÜÂë
     #passwd Óû§
 
3¡¢ÏÞ¶¨Óû§µÄȨÏÞ£¬½«Óû§Ö¸¶¨µ½Äܹ»²Ù×÷µÄĿ¼
     #chown Óû§Ãû
.ftp  Ŀ¼
  -R
4¡¢ ¸øĿ¼¸ ......

ѧϰlinuxµÄºÃÊé¼®

http://docs.linuxtone.org/shell/
¸ß¼¶Bash½Å±¾±à³ÌÖ¸ÄÏ   £ºÒ»±¾ÉîÈëѧϰshell½Å±¾ÒÕÊõµÄÊé¼® 
Õâ±¾Êé¼Ù¶¨ÄãûÓÐÈκιØÓڽű¾»òÒ»°ã³ÌÐòµÄ±à³Ì֪ʶ, µ«ÊÇÈç¹ûÄã¾ß±¸Ïà¹ØµÄ֪ʶ, ÄÇôÄ㽫ºÜÈÝÒ×¾ÍÄܹ»´ïµ½Öи߼¶µÄˮƽ. . . ËùÓÐÕâЩֻÊÇUNIX®ºÆå«ÖªÊ¶µÄһС²¿·Ö. Äã¿ÉÒ԰ѱ¾Êé×÷Ϊ½Ì²Ä, ×ÔѧÊÖ²á, ......

Linux ϵͳĿ¼½éÉÜ

/lib/
— °üº¬Ðí¶à±» /bin/ ºÍ /sbin/  ÖеijÌÐòʹÓõĿâÎļþ¡£Ä¿Â¼ /usr/lib/ Öк¬Óиü¶àÓÃÓÚÓû§³ÌÐòµÄ¿âÎļþ¡£
/libĿ¼Ï·ÅÖõÄÊÇ/binºÍ/sbinĿ¼Ï³ÌÐòËùÐèµÄ¿âÎļþ¡£/libĿ¼ÏµÄÎļþµÄÃû³Æ×ñÑ­ÏÂÃæµÄ¸ñʽ£º
libc.so.*
ld*
½ö½ö±»/usrĿ¼ÏµijÌÐòËùʹÓõĹ²Ïí¿â²»±Ø·Åµ½/libĿ¼Ï¡£Ö»ÓÐ/binºÍ/sbin ......

Linux ½Å±¾±àд»ù´¡(ËÄ)

4)º¯Êý
Èç¹ûÄúдÁËһЩÉÔ΢¸´ÔÓһЩµÄ³ÌÐò£¬Äú¾Í»á·¢ÏÖÔÚ³ÌÐòÖпÉÄÜÔÚ¼¸¸öµØ·½Ê¹ÓÃÁËÏàͬµÄ´úÂ룬²¢ÇÒÄúÒ²»á·¢ÏÖ£¬Èç¹ûÎÒÃÇʹÓÃÁ˺¯Êý£¬»á·½±ãºÜ¶à¡£Ò»¸öº¯ÊýÊÇÕâ¸öÑù×ӵģº
functionname()
{
# inside the body $1 is the first argument given to the function
# $2 the second ...
body
}
ÄúÐèÒªÔÚÿ¸ö³ÌÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ