Terminal logging character problem -Newbie-


 
Thread Tools Search this Thread
Operating Systems Linux Terminal logging character problem -Newbie-
# 1  
Old 03-08-2010
[SOLVED]Terminal logging character problem -Newbie-

Im a complete newbie tryin to work with linux centos;
in terminal wanted to log with script command;
but output file has some strange characters when I try to open with gedit or bluefish
terminal , gedit, bluefish encoding is utf-8 ;

Code:
Script started on Mon 08 Mar 2010 03:32:39 PM EET
]0;anacondauser@localhost:~[anacondauser@localhost ~]$ ls -al

[00mtotal 900
drwx------ 35 anacondauser anacondauser   4096 Mar  8 15:32 [00;34m.[00m
drwxr-xr-x  3 root         root           4096 Jun  6  2009 [00;34m..[00m
-rw-rw-r--  1 anacondauser anacondauser      0 Mar  8 15:32 [00mabc.txt[00m
drwx------  3 anacondauser anacondauser   4096 Jun  6  2009 [00;34m.adobe[00m
-rw-------  1 anacondauser anacondauser   5814 Mar  8 15:24 [00m.bash_history[00m
-rw-r--r--  1 anacondauser anacondauser     33 May 25  2008 [00m.bash_logout[00m

[m]0;anacondauser@localhost:~[anacondauser@localhost ~]$ exit

Script done on Mon 08 Mar 2010 03:32:44 PM EET
also vim output has weird characters

drwx------ 35 anacondauser anacondauser 4096 Mar 8 15:32 ^[[00;34m.^[[00m^M
drwxr-xr-x 3 root root 4096 Jun 6 2009 ^[[00;34m..^[[00m^M
-rw-rw-r-- 1 anacondauser anacondauser 0 Mar 8 15:32 ^[[00mabc.txt^[[00m^M
drwx------ 3 anacondauser anacondauser 4096 Jun 6 2009 ^[[00;34m.adobe^[[00m^M
-rw------- 1 anacondauser anacondauser 5814 Mar 8 15:24 ^[[00m.bash_history^[[00m^M
-rw-r--r-- 1 anacondauser anacondauser 33 May 25 2008 ^[[00m.bash_logout^[[00m^M

dos2unix outputs only txt file (from abc.log to abc.txt);

those weird color characters remains the same :(


I was hitting  keys to remap ^[[00m; ^M etc by
ctrlv+key combinations and I mistakenly hit enter or did sth
and my F5 key is not working right now;

stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

[anacondauser@centaur ~]$ stty
speed 38400 baud; line = 0;
eol = M-^?; eol2 = M-^?; swtch = M-^?;
ixany iutf8

issue remains the same
how can I get rid of those weird color characters when I log with script command ?
or how could I log my terminal output without those weird characters(btw xterm doesn allow me log to file)?

Last edited by Scott; 03-08-2010 at 04:50 PM.. Reason: Removed some formatting, added code tags......
# 2  
Old 03-08-2010
Here is a discussion of terminal colors (those goofy characters) and how to deal with them:

So You Like Color--The Mysterious ^[[ Characters | Linux Journal
# 3  
Old 03-08-2010
FYI...
@TERMINAL CONSOLE> SHELL=/bin/sh PS1="$" script abc.log --->worked like a charm Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore. Here is what 's happening: * I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies

2. UNIX and Linux Applications

Need help for a newbie to stream tweets with the Terminal

Hey everyone, First, I'm not sure whether I should have posted this thread under the basic Unix commands forum or not, so I apologize if this was not the best place to do so... Then, as the title of this discussion suggests, I would like to stream specific tweets for research purposes... (2 Replies)
Discussion started by: MichaelGauthier
2 Replies

3. SCO

sco remote logging problem

Hello, I am trying to write log from sco box to a remote host. We already have that setting working for linux server using syslog. With this setting(on LINUX) *.* @remote-host for sco I have this *.debug /usr/adm/syslog *.* ... (3 Replies)
Discussion started by: polestar
3 Replies

4. UNIX for Dummies Questions & Answers

problem in logging webmin

hi , i have a problem in logging webmin in ubuntu, i forgot my webmin password, and in internet i searched for result , at last i got one common answer that /usr/lib/webmin/changepasswd.pl /etc/webmin username passwd . i changed the passwd and when i logged into webmin it shows new ... (0 Replies)
Discussion started by: ramuk
0 Replies

5. Shell Programming and Scripting

Logging Via Terminal using cURL

I am having trouble logging in to an account via cURL in the terminal. I need to be able to log in to this page then get a query result from another. I need to do this as a shell script all at once. Im not sure how to handle cookies with terminal & have found very little example. curl ... (1 Reply)
Discussion started by: handell
1 Replies

6. OS X (Apple)

newbie looking for Terminal tutorials

I've just started learning about Unix and the Terminal in Mac OSX. I've found a few good starting resources, such as OSXFAQ - Technical News and Support for Mac OS X, but most of them are based on OSX 10.2 or thereabouts. Does anyone know of any good tutorials that specifically address Leopard? ... (1 Reply)
Discussion started by: mightypants
1 Replies

7. HP-UX

problem in logging into root

when i am trying to login through root i am getting following error Last successful login for root: Tue Feb 3 16:44:40 IST-5:30 2009 on pts/tc Last unsuccessful login for root: Tue Feb 3 16:41:01 IST-5:30 2009 on pts/tc Please wait...checking for disk quotas crt0: ERROR couldn't open... (6 Replies)
Discussion started by: mnmca
6 Replies

8. UNIX for Advanced & Expert Users

sending a null character to a terminal

I'm testing out some ESMTP AUTH stuff, and it requires that the username and password be on the same line separated by a null character. Does anyone know how to echo the ASCII null character? Thanks, Alex (3 Replies)
Discussion started by: vertigo23
3 Replies

9. UNIX for Dummies Questions & Answers

Run the start script from the terminal? Newbie Time!

Hi, How do I "run a script"? I'm trying to start up some software called ElectroServer 3, and was told I just needed to "run the start script from the terminal to get things going". From the terminal, i use cd command to change to the software's directory, and I guess the script in question is... (4 Replies)
Discussion started by: waking_bear
4 Replies
Login or Register to Ask a Question