차~~~~암 오래간만에 포스팅한다. -_-;
그간 참 많은 이벤트들이 있엇는데, 게을러서 글을 쓰지 않았네.  이제라도 조금씩 포스팅을 하자~~


오늘은 Fedora의 이야기.

쭈~~욱 Ubuntu를 써오다가, Fedora-eclipse에 반해서, Fedora 9로 갈아탔다.
솔직히 아직 정착이 안되서 자주 곁눈질을 하게 된다. 새 버전이 나올때마다...
잡담은 이상...

Fedora를 설치하면 항상 나를 괴롭혔던것이 Nvidia드라이버설치 문제.
내가 쓰는 그래픽카드가 괴짜여서, 보통 방법으로는 설치가 안된다.
이번도 어김없이 한참동안 헤메다가, 방법을 찾아냈다.

설치순서:
1, kernel-devel를 설치하기.
    이놈을 설치하지 않아서 Nvidia의 드라이버가 설치가 안됬던거야.
2, Nvidia에서 드라이버를 다운하기.
    Nvidia홈피에 가서 자기 카드에 맞는 드라이버 다운하기.
    난 Nvidia 8500GT이니까,  NVIDIA-Linux-x86_64-173.14.12-pkg2.run 를 다운.
3, init 3에서 드라이버 설치하기.
    X를 종료하고, init 3환경에서  sh NVIDIA-Linux-x86_64-173.14.12-pkg2.run 을 실행.


그러면 이제 지가 알아서 다 설치해준다. 물어보는건 무조건 yes.
이상 설치끝.




이올린에 북마크하기(0) 이올린에 추천하기(0)

    For loop iteration

    Substitute values for variable and perform task:

        for variable in word ...
    do
    command
    done
    For example:
        for i in `cat $LOGS`
    do
    mv $i $i.$TODAY
    cp /dev/null $i
    chmod 664 $i
    done
    Alternatively you may see:
        for variable in word ...; do command; done
  • Case

    Switch to statements depending on pattern match

        case word in
    [ pattern [ | pattern ... ] )
    command ;; ] ...
    esac
    For example:
        case "$year" in

    [0-9][0-9])
    year=19${year}
    years=`expr $year - 1901`
    ;;
    [0-9][0-9][0-9][0-9])
    years=`expr $year - 1901`
    ;;
    *)
    echo 1>&2 Year \"$year\" out of range ...
    exit 127
    ;;
    esac
  • Conditional Execution

    Test exit status of command and branch

        if command
    then
    command
    [ else
    command ]
    fi
    For example:
        if [ $# -ne 3 ]; then
    echo 1>&2 Usage: $0 19 Oct 91
    exit 127
    fi
    Alternatively you may see:
        if command; then command; [ else command; ] fi
  • While/Until Iteration

    Repeat task while command returns good exit status.

        {while | until} command
    do
    command
    done
    For example:
        # for each argument mentioned, purge that directory

    while [ $# -ge 1 ]; do
    _purge $1
    shift
    done
    Alternatively you may see:
        while command; do command; done


Powered by ScribeFire.

이올린에 북마크하기(0) 이올린에 추천하기(0)

  • Variables

    Variables are sequences of letters, digits, or underscores beginning with a letter or underscore. To get the contents of a variable you must prepend the name with a $.

    Numeric variables (eg. like $1, etc.) are positional vari- ables for argument communication.

    • Variable Assignment

      Assign a value to a variable by variable=value. For example:

          PATH=/usr/ucb:/usr/bin:/bin; export PATH
      or
          TODAY=`(set \`date\`; echo $1)`
    • Exporting Variables

      Variables are not exported to children unless explicitly marked.

          # We MUST have a DISPLAY environment variable

      if [ "$DISPLAY" = "" ]; then
      if tty -s ; then
      echo "DISPLAY (`hostname`:0.0)? \c";
      read DISPLAY
      fi
      if [ "$DISPLAY" = "" ]; then
      DISPLAY=`hostname`:0.0
      fi
      export DISPLAY
      fi
      Likewise, for variables like the PRINTER which you want hon- ored by lpr(1). From a user's .profile:
          PRINTER=PostScript; export PRINTER
      Note: that the Cshell exports all environment variables.

    • Referencing Variables

      Use $variable (or, if necessary, ${variable}) to reference the value.

          # Most user's have a /bin of their own

      if [ "$USER" != "root" ]; then
      PATH=$HOME/bin:$PATH
      else
      PATH=/etc:/usr/etc:$PATH
      fi
      The braces are required for concatenation constructs.
      $p_01
      The value of the variable "p_01".
      ${p}_01
      The value of the variable "p" with "_01" pasted onto the end.

    • Conditional Reference

      ${variable-word}
      If the variable has been set, use it's value, else use word.
      POSTSCRIPT=${POSTSCRIPT-PostScript};
      export POSTSCRIPT

      ${variable:-word}
      If the variable has been set and is not null, use it's value, else use word.

      These are useful constructions for honoring the user envi- ronment. Ie. the user of the script can override variable assignments. Cf. programs like lpr(1) honor the PRINTER environment variable, you can do the same trick with your shell scripts.

      ${variable:?word}
      If variable is set use it's value, else print out word and exit. Useful for bailing out.

    • Arguments

      Command line arguments to shell scripts are positional vari- ables:

      $0, $1, ...
      The command and arguments. With $0 the command and the rest the arguments.
      $#
      The number of arguments.
      $*, $@
      All the arguments as a blank separated string. Watch out for "$*" vs. "$@".
      And, some commands:
      shift
      Shift the postional variables down one and decrement number of arguments.
      set arg arg ...
      Set the positional variables to the argument list.

      Command line parsing uses shift:

          # parse argument list

      while [ $# -ge 1 ]; do
      case $1 in
      process arguments...
      esac
      shift
      done
      A use of the set command:
          # figure out what day it is

      TODAY=`(set \`date\`; echo $1)`

      cd $SPOOL

      for i in `cat $LOGS`
      do
      mv $i $i.$TODAY
      cp /dev/null $i
      chmod 664 $i
      done
    • Special Variables
      $$
      Current process id. This is very useful for constructing temporary files.
               tmp=/tmp/cal0$$
      trap "rm -f $tmp /tmp/cal1$$ /tmp/cal2$$"
      trap exit 1 2 13 15
      /usr/lib/calprog >$tmp

      $?
      The exit status of the last command.
               $command
      # Run target file if no errors and ...

      if [ $? -eq 0 ]
      then
      etc...
      fi

    출처: http://www.hsrl.rutgers.edu/ug/shell_help.html


Powered by ScribeFire.

이올린에 북마크하기(0) 이올린에 추천하기(0)

안절부절...

Talkbox 2007/12/28 13:46
오늘이 올해 출근 마지막날이다.  내일부터 년말휴가이다. 

뭐 학교다닐때처럼 한달씩 방학하는것은 아니지만, 휴가에 들떠있는 상태이다.

회사에는 많은 사람들이 이번주일을 휴가내고 출근하지 않았다.

특히 오늘은 휴가하는 사람이 너무 많다.  주위에 빈자리가 너무 많아서 혼자

출근한 듯한 기분도 든다. -_-;


어제는 일이 많아서 바빠서 맴돌았는데, 오늘에는 아무런 할일도 없고, 맘도

들떠있고.  도무지 편한게 앉아있질 못하겠다.  이럴줄 알았으면 어제 일을 좀

남겨두는건데. 다들 휴가한다고 다그쳐서 끝내버리는 바람에...



아침부터 지금까지 LFS자료를 들여다 보고 있다.  나만의 linux라는 단어에 반해서.

빨랑 집에가서 해보고 싶은데.  회사에서도 지가 하고 싶은 일을 할수 있는 공간을

마련해주었으면 좋겠다.  사실 이런것도 좀 알아두면 일하는데도 많은 도움이 될텐데...


퇴근시간을 기다리는것이 너무 힘들다. 아직 5시간.  ㅠ.ㅠ

이 글을 사장이 봤으면 뭐라고 할까?  ㅋㅋㅋ  

다행이도 우리 사장은 한글을 못알본다. ㅎㅎ 


참 다행이다.


Powered by ScribeFire.

이올린에 북마크하기(0) 이올린에 추천하기(0)

블로그 운영?

My Zombi Life 2007/12/27 10:19
블로그를 만든지가 벌써 1년쯤 된것같다.  그동안 쓴 글이 35개정도?  -_-;

이 글도 거의 한달(?)만에 올리는 글이다.

열심히 글을 올렸다면 100개는 더 올렸을꺼다.  그런데 그렇게 글을 올리기가

안된다.  회사에서 글을 올리기가 불편하다는 핑계로 ...


그럼에도 불구하고, 요즘에 블로그에 방문자가 부쩍 늘어난것 같다.

어디에다 내 블로그를 광고한것도 아니고, 그렇다고 글을 자주 올리는것도 아니고.

왜 일까? -_-;  





그나저나, 몇달전부터 만들어야겠다고 한 원격블로그툴을 빨리 만들어야 겠는데.

회사끝나면 기진맥진해서 집에가서 거의 컴퓨터를 하지 않으니... -_-;


이제 년말에 휴가가 있으니, 시간을 좀 내서 만들어봐야겠다...







Powered by ScribeFire.

이올린에 북마크하기(0) 이올린에 추천하기(0)

◀ PREV : [1] : [2] : [3] : [4] : [5] : ... [8] : NEXT ▶