0005. shell 도중 FTP 사용하기
echo "++++++++++++++++++++++++++"
echo " FTP "
echo "++++++++++++++++++++++++++"
ftp -v -n 10.10.10.10 << EOF
user ope unix1
bin
cd /home/pro/rte/var/log/hist
mget an_${JOB_DATE}*
bye
EOF
'IT' 카테고리의 다른 글
0007. [ select case ] 스위치 확인 및 바이너리 확인 스크립드 (0) | 2015.06.29 |
---|---|
0006. ExitProcess() 사용법 (0) | 2015.06.29 |
0004. [sh ] 쉘 처음시작시 사용유저검색하기 (0) | 2015.06.29 |
0003. [sh ] shell 에서 sqlldr 사용하기 (0) | 2015.06.29 |
0002. [sqlplus ] 쉘에서 sqlplus 로 delete drop create insert 구문 사용하기 (0) | 2015.06.29 |
0004. [sh ] 쉘 처음시작시 사용유저검색하기
#!/bin/sh
if [ $LOGNAME != horany ]
then
echo "Must have horany privileages to run this program"
cat << EOF
Warning: Must have horany privileages to run this program
Please Try Again this program.
Otherwise press Control C.
EOF
exit 1
fi
echo "Coding your program!"
'IT' 카테고리의 다른 글
0006. ExitProcess() 사용법 (0) | 2015.06.29 |
---|---|
0005. shell 도중 FTP 사용하기 (0) | 2015.06.29 |
0003. [sh ] shell 에서 sqlldr 사용하기 (0) | 2015.06.29 |
0002. [sqlplus ] 쉘에서 sqlplus 로 delete drop create insert 구문 사용하기 (0) | 2015.06.29 |
0001. [Solaris] (install) <환경설정> 솔라리스8 설치 후 환경 설정정리 (0) | 2015.06.29 |
0003. [sh ] shell 에서 sqlldr 사용하기
shell 에서 sqlldr 사용하기
export ctlfile=hist_${JOB_DATE}.ctl
echo "load data" > $ctlfile
echo "infile $file" >> $ctlfile
echo "badfile ${file}.bad" >> $ctlfile
echo "append" >> $ctlfile
echo "into table hist_tmp" >> $ctlfile
echo "( actv_date position(34:47) date \"yyyymmddhh24miss\"," >> $ctlfile
echo " ent_seq_no sequence(${seq_no},1)," >> $ctlfile
echo " ban position(25:33) integer external," >> $ctlfile
echo " oper_id position(01:07) integer external," >> $ctlfile
echo " imq_mac_addr position(08:24) char nullif imq_mac_addr = '@@ '," >> $ctlfile
echo " org_id position(48:54) integer external," >> $ctlfile
echo " window_name position(55:114) char," >> $ctlfile
echo " ctn position(115:125) char," >> $ctlfile
echo " model_id position(126:129) integer external," >> $ctlfile
echo " msn position(130:149) char," >> $ctlfile
echo " log_ind position(150:150) char," >> $ctlfile
echo " dealer_code position(151:157) char)" >> $ctlfile
sqlldr control=$ctlfile userid=$ORA_USER/$ORA_PASS@$ORA_INST
'IT' 카테고리의 다른 글
0005. shell 도중 FTP 사용하기 (0) | 2015.06.29 |
---|---|
0004. [sh ] 쉘 처음시작시 사용유저검색하기 (0) | 2015.06.29 |
0002. [sqlplus ] 쉘에서 sqlplus 로 delete drop create insert 구문 사용하기 (0) | 2015.06.29 |
0001. [Solaris] (install) <환경설정> 솔라리스8 설치 후 환경 설정정리 (0) | 2015.06.29 |
0638. [Shell] (case) <here문서> httpd WAS 재기동 script (0) | 2015.05.12 |
0002. [sqlplus ] 쉘에서 sqlplus 로 delete drop create insert 구문 사용하기
쉘에서 sqlplus 로 delete drop create insert 구문 사용하기
sqlplus -s $ORA_USER/$ORA_PASS@$ORA_INST << EOF
delete from call_statistics
where work_date = '$JOB_DATE';
drop table call_stat_tmp2;
create table call_stat_tmp2
tablespace $var_tablespace
storage (initial 1M next 1M pctincrease 0 maxextents unlimited)
as
select a.dealer_code,
a.contract_cnt,
nvl(nvl(b.l33_org_id, b.l21_org_id), b.l35_org_id) l33_org_id,
from call_stat_tmp1 a,
og_org_master b
where b.org_id = a.dealer_code
and b.org_div not in ('A', 'K');
insert into CALL_STATISTICS
select '$JOB_DATE',
null
from call_stat_tmp2;
EOF
'IT' 카테고리의 다른 글
0004. [sh ] 쉘 처음시작시 사용유저검색하기 (0) | 2015.06.29 |
---|---|
0003. [sh ] shell 에서 sqlldr 사용하기 (0) | 2015.06.29 |
0001. [Solaris] (install) <환경설정> 솔라리스8 설치 후 환경 설정정리 (0) | 2015.06.29 |
0638. [Shell] (case) <here문서> httpd WAS 재기동 script (0) | 2015.05.12 |
0639. [UNIX] (motd issue .hushlogin) <sunOS> 로그인시 메세지 출력하기 (0) | 2015.05.12 |
0001. [Solaris] (install) <환경설정> 솔라리스8 설치 후 환경 설정정리
1. Network
/etc/nsswitch.conf
hosts: files dns (추가)
/etc/resolv.conf
domain suned.co.kr
nameserver 10.10.10.10
/etc/defaultrouter
192.0.0.1
#rlogin 가능
.rhosts
+ root
#+ 모든 hosts 인정 , root 만 인정
/etc/hosts
192.168.10.11 myhost
2. login shell 변경
pssswd -e
new shell : /bin/ksh
3. user home directory
useradd -D -b /export/home
4.초기화파일
.profile
stty -istrip cs8 erase ^H #cs 는 character set
umast 022
PATH=/usr/bin:/usr/bin:/usr/ucb/:/sbin:/usr/dt/bin:/usr/local/bin:/usr/ccs/bin:.
EDITOR=vi
ENV=$HOME/.kshrc
export PATH EDITOR ENV
.kshrc
PS1='[$PWS] #'
export PS1
set -o vi
alias c=clear
alias ll='ls -l'
5. /etc/default/login
#CONSOLE=/dev/console #주석처리
'IT' 카테고리의 다른 글
0003. [sh ] shell 에서 sqlldr 사용하기 (0) | 2015.06.29 |
---|---|
0002. [sqlplus ] 쉘에서 sqlplus 로 delete drop create insert 구문 사용하기 (0) | 2015.06.29 |
0638. [Shell] (case) <here문서> httpd WAS 재기동 script (0) | 2015.05.12 |
0639. [UNIX] (motd issue .hushlogin) <sunOS> 로그인시 메세지 출력하기 (0) | 2015.05.12 |
0640. [UNIX] (shell) <vi> vi 사용시 단말기 폭 초과 securecrt (0) | 2015.05.11 |