파일 a.txt에 1 2 3 4 5 6 7
이렇게 저장이 되어있다고 가정할때
배쉬 스크립트에서 이 파일을 배열로 받아올 수 있을까요?
numbers=`cat a.txt`
(and use it like,
for n in `cat a.txt` ; do
echo $n
done
잘 해결했습니다!!
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
numbers=`cat a.txt` (and use
numbers=`cat a.txt`
(and use it like,
for n in `cat a.txt` ; do
echo $n
done
감사합니다
잘 해결했습니다!!
댓글 달기