LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2006, 02:29 PM   #1
trasher
LQ Newbie
 
Registered: Mar 2005
Location: Turkey
Distribution: Mandrake 10.1
Posts: 29

Rep: Reputation: 15
script command


Hi all!
I've used the "script" command, as script > out. In the "out" file, there are lots of control characters, how can I get plain ASCII text?
Thanks for any help...
 
Old 02-05-2006, 02:47 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what kind of characters? it records exactly what would go to your terminal, so escape codes for colors in ls etc... would be included for it to do its job.
 
Old 02-05-2006, 03:02 PM   #3
trasher
LQ Newbie
 
Registered: Mar 2005
Location: Turkey
Distribution: Mandrake 10.1
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks for your interest.
When I open the "out" file with KWrite, it contains some control characters, for example;
lines 1-25  ESCESCOOBB
lines 2-26  ESCESCOOBB -b, --escape.

However, when I open it with "cat" command, it prints well. Why does KWrite show the control characters, should I check the encoding type?
 
Old 02-05-2006, 03:59 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well that's exactly what the command is designed to do, it records verbatim what goes on for a few commands, including escape characters for formatting etc... what do you actually want to do?
 
Old 02-05-2006, 04:23 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
a word processor will often read a file differently than will a text editor.

"script" appears to be a logging utility--and may log **everything** that happens--regardless if it readable by other programs.
 
Old 02-06-2006, 06:20 AM   #6
trasher
LQ Newbie
 
Registered: Mar 2005
Location: Turkey
Distribution: Mandrake 10.1
Posts: 29

Original Poster
Rep: Reputation: 15
I wondered how I can get an output in a plain text format but now I've understood what the aim of the "script" command is.
Thanks for help and interest acid_kewpie and pixellany
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what script to place this command? fuzzhead85 Mandriva 1 03-23-2005 11:39 PM
sqlplus command from script Grassie Coetzee LinuxQuestions.org Member Intro 2 03-13-2005 12:01 PM
Command in shell script Grassie Coetzee Linux - Software 1 03-13-2005 11:42 AM
help with Date command in script icw_sec Programming 6 01-06-2004 11:02 AM
script 'exit' command kilobravo Linux - General 8 01-16-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration