LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 03: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, 03:47 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
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, 04: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, 04:59 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
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, 05:23 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
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, 07: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-24-2005 12:39 AM
sqlplus command from script Grassie Coetzee LinuxQuestions.org Member Intro 2 03-13-2005 01:01 PM
Command in shell script Grassie Coetzee Linux - Software 1 03-13-2005 12:42 PM
help with Date command in script icw_sec Programming 6 01-06-2004 12:02 PM
script 'exit' command kilobravo Linux - General 8 01-16-2003 04:24 PM


All times are GMT -5. The time now is 11:03 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration