sun's longitude:
300 49 39.02
·
자유게시판
·
묻고답하기
·
알파문서
·
RPMS list
·
사용자문서
·
팁/FAQ모음
·
리눅스Links
·
자료실
·
서버정보
·
운영자
·
Books/FAQ
·
FreeBSD
/board/reply.php:소스보기
알파문서
자주 잊어먹거나, 메모해 둘 필요성이 있는 팁이나 문서, 기타 등등
글을 올려주셔서 감사합니다.......................................
san2(at)linuxchannel.net
[*** 쓰기 금지단어 패턴 ***]
글 본문 중간에 업로드할 이미지를 추가하는 방법 : @@이미지이름@@
ex) @@foo.gif@@
닉네임
닉네임을 적어 주십시오.
이메일
옵션입니다.
홈페이지
홈페이지 URL(http:// 포함)을 적어 주십시오.
암 호
암호를 입력하셔야 수정, 삭제가 가능합니다.
HTML
사용함
사용안함
HTML 코드 사용 여부
제 목
올릴자료
내 용
[산이]님이 남기신 글: >-- example.sh ----------------------------- >#!/bin/sh > >OIFS=$IFS > >TT="10 > 21 22 23 2444444444444444 >30 31 > >50 > > > 61 >70 >" > >echo '------------------------------------' >echo 'orignal string' >echo "$TT" >echo '------------------------------------' > >echo '------------------------------------' >echo 'for() test with default IFS' >echo '------------------------------------' > >for n in $TT ; do > echo "'$n'" >done > >IFS=' >' >echo '------------------------------------' >echo 'for() test with \r\n IFS' >echo '------------------------------------' > >for n in $TT ; do > echo "'$n'" >done > >IFS=$OIFS >echo '------------------------------------' >echo 'pipe and read test with default IFS' >echo '------------------------------------' > >echo "$TT" | while read line etc ; do > echo "'$line' '$etc'" >done > >IFS=' >' >echo '------------------------------------' >echo 'pipe and read test with \r\n IFS' >echo '------------------------------------' > >echo "$TT" | while read line etc ; do > echo "'$line' '$etc'" >done > >IFS=$OIFS >echo '------------------------------------' >echo 'stdin read file with default IFS' >echo '------------------------------------' > >while read line etc ; do > echo "'$line' '$etc'" >done < /tmp/foo.txt > >IFS=' >' >echo '------------------------------------' >echo 'stdin read file with \r\n IFS' >echo '------------------------------------' > >while read line etc ; do > echo "'$line' '$etc'" >done < /tmp/foo.txt > >IFS=$OIFS >echo '------------------------------------' >echo 'single line read with default IFS' >echo '------------------------------------' > >echo "some foo bar comment" | >{ > read first second others > echo "'${first}' '${second}' '${others}'" >} > >IFS=' >' >echo '------------------------------------' >echo 'single line read with default IFS' >echo '------------------------------------' > >echo "some foo bar comment" | >{ > read first second others > echo "'${first}' '${second}' '${others}'" >} > >echo >echo "external variable test: '${first}'" ## is empty > >exit 0 >--------------------------------------------------- > >// result > >------------------------------------ >orignal string >------------------------------------ >10 > 21 22 23 2444444444444444 >30 31 > >50 > > > 61 >70 > >------------------------------------ >for() test with default IFS >------------------------------------ >'10' >'21' >'22' >'23' >'2444444444444444' >'30' >'31' >'50' >'61' >'70' >------------------------------------ >for() test with \r\n IFS >------------------------------------ >'10' >' 21 22 23 2444444444444444' >'30 31' >'50' >' 61' >'70' >------------------------------------ >pipe and read test with default IFS >------------------------------------ >'10' '' >'21' '22 23 2444444444444444' >'30' '31' >'' '' >'50' '' >'' '' >'' '' >'61' '' >'70' '' >'' '' >------------------------------------ >pipe and read test with \r\n IFS >------------------------------------ >'10' '' >' 21 22 23 2444444444444444' '' >'30 31' '' >'' '' >'50' '' >'' '' >'' '' >' 61' '' >'70' '' >'' '' >------------------------------------ >stdin read file with default IFS >------------------------------------ >'111' '22222' >'file' '' >'foo' '' >------------------------------------ >stdin read file with \r\n IFS >------------------------------------ >'111 22222' '' >' file' '' >'foo' '' >------------------------------------ >single line read with default IFS >------------------------------------ >'some' 'foo' 'bar comment' >------------------------------------ >single line read with default IFS >------------------------------------ >'some foo bar comment' '' '' > >external variable test: '' ========================================
공용 보안 SSL 서버가 준비되기 전까지는 off 합니다
Copyright 1997-2026. linuxchannel.net. All rights reserved.