[C언어] 안녕하세요? 리눅스에서 새 터미널 창에서 작업을 시키고 싶습니다.

ggudwns의 이미지

test.c

void main()
{
printf("hello world\n");
getch();
}

제가 위에 작성한 코드는

gcc test.c -o test
./test
hello world

이런 식으로 컴파일하고 실행하면,
터미널 창에 "hello world" 같은 출력구문이 그대로 남게 됩니다.

이는 같은 터미널 창에서 프로그램이 진행되서 생기는 문제같습니다만,
어떻게 하면 프로그램이 vi처럼 새로운 터미널 창을 띄워서 작업할 수 있도록 만들 수 있나요......?

system("clear")

차선으로 이것도 사용해봤는데, 이건 화면을 지우는게 아니라,
터미널창을 위쪽으로 끌어올려서 지우는 것처럼 만드는 것이지,
실제론 지운게 아니더군요......
(스크롤 살짝 올려보니 지저분한 출력문이......)

키워드라도 알려주시면 어떻게든 한번 해보겠습니다.

익명 사용자의 이미지

gnome-terminal -e ./test

shint의 이미지


20 Useful Terminal Emulators for Linux
http://www.tecmint.com/linux-terminal-emulators/

How do I run .sh files in Terminal?
http://askubuntu.com/questions/38661/how-do-i-run-sh-files-in-terminal

How do I run .sh file in terminal?
https://www.quora.com/How-do-I-run-sh-file-in-terminal

EugeneDae/Run-in-Terminal-Bundle
https://github.com/EugeneDae/Run-in-Terminal-Bundle
A simple TextMate bundle to run Python, Ruby, PHP, Bash scripts in Terminal.app without stealing focus from the TextMate window.

----------------------------------------------------------------------------
젊음'은 모든것을 가능하게 만든다.

매일 1억명이 사용하는 프로그램을 함께 만들어보고 싶습니다.
정규 근로 시간을 지키는. 야근 없는 회사와 거래합니다.

각 분야별. 좋은 책'이나 사이트' 블로그' 링크 소개 받습니다. shintx@naver.com

ddoman의 이미지

jeff_an의 이미지

.

goforit의 이미지

> 어떻게 하면 프로그램이 vi처럼 새로운 터미널 창을 띄워서 작업할 수 있도록 만들 수 있나요......?

이러한 목적으로 GNU Screen란 프로그램이 있습니다. 나름 Vi 더불어 굉장히 유명한 프로그램입니다.

GNU Screen에 일단 익숙해지면, 사람들은 Tmux 란 프로그램으로 넘어가곤합니다.

요즘에 Clouding 환경으로 접어 들면서 GNU Screen/Tmux에 다시 주목을 받고 있는 추세입니다.

ggudwns의 이미지

일단 ncurse를 먼저 보도록 하겠습니다.
링크를 들어가서 확인해보니 제가 원하는 라이브러리로 보이는군요

GNU Screen과 Tmux도 유명한 프로그램인거 같은데, 어떤 건지 확인하고 알아두는게 좋을 것 같군요

정보 감사합니다._(_ _)_

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <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].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <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].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <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].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <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].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.