LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-26-2013, 12:31 PM   #1
Dalavich
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Rep: Reputation: Disabled
Remove control characters in Script output


I'm using the "script" command to log my entries and activities in Linux.

All is going well, but it's capturing the control characters too, which is fine for displaying it back in the terminal.

However when I come to edit the text, these are all present and it ruins the formatting.

Is there a way to remove them for text editing? Thanks.

Example output (characters highlighted)...

Script started on Tue 26 Feb 2013 06:09:26 PM UTC
pc3:~#
pc3:~# hostname
pc3
pc3:~# ls
pc3:~# ls /hosthome/ -l
total 56
drwxr-xr-x 2 guest guest 4096 2013-01-22 11:46 Desktop
drwxr-xr-x 2 guest guest 4096 2013-01-16 16:36 Documents
pc3:~# exit
exit
 
Old 02-26-2013, 02:34 PM   #2
danielbmartin
Senior Member
 
Registered: Apr 2010
Location: Apex, NC, USA
Distribution: Mint 17.3
Posts: 1,528

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Google may provide the advice you seek.
Do a Google search on the title of this thread ...
Code:
Remove control characters in Script output
... and you will find plenty of relevant pages.

Daniel B. Martin
 
Old 02-26-2013, 03:05 PM   #3
Dalavich
LQ Newbie
 
Registered: Feb 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks, I think I found the tr command - but as usual with Google there was a load of irrelevant dross, hence why I found this forum!
 
  


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
Remove Control Characters from a File NeonFlash Linux - Newbie 3 02-04-2013 09:24 PM
How to remove ^L control characters from text files? bashari Linux - Newbie 2 09-12-2012 11:36 AM
[SOLVED] Remove characters from grep output intz Programming 9 05-04-2010 06:03 AM
[SOLVED] Saving output without control characters damianpfister Linux - General 7 07-30-2009 04:34 AM
How to remove decoration characters from GCC output? chandru.in Programming 2 11-27-2007 09:39 PM


All times are GMT -5. The time now is 07:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration