Sponsored Content
Operating Systems Linux Terminal logging character problem -Newbie- Post 302401979 by anacondauser on Monday 8th of March 2010 11:55:12 AM
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......
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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. 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

7. 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

8. 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

9. 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
SCRIPT(1)							   User Commands							 SCRIPT(1)

NAME
script -- make typescript of terminal session SYNOPSIS
script [-a] [-c command] [-e] [-f] [-q] [-t[=file]] [-V] [-h] [file] DESCRIPTION
script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr(1). If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript. Options: -a, --append Append the output to file or typescript, retaining the prior contents. -c, --command command Run the command rather than an interactive shell. This makes it easy for a script to capture the output of a program that behaves differently when its stdout is not a tty. -e, --return Return the exit code of the child process. Uses the same format as bash termination on signal termination exit code is 128+n. -f, --flush Flush output after each write. This is nice for telecooperation: one person does `mkfifo foo; script -f foo', and another can super- vise real-time what is being done using `cat foo'. --force Allow the default output destination, i.e. the typescript file, to be a hard or symbolic link. The command will follow a symbolic link. -q, --quiet Be quiet. -t, --timing[=file] Output timing data to standard error, or to file when given. This data contains two fields, separated by a space. The first field indicates how much time elapsed since the previous output. The second field indicates how many characters were output this time. This information can be used to replay typescripts with realistic typing and output delays. -V, --version Output version information and exit. -h, --help Output help and exit. The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not set) for the C-shell, csh(1)). Certain interactive commands, such as vi(1), create garbage in the typescript file. Script works best with commands that do not manipulate the screen, the results are meant to emulate a hardcopy terminal. ENVIRONMENT
The following environment variable is utilized by script: SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most shells set this variable automatically). SEE ALSO
csh(1) (for the history mechanism), scriptreplay(1). HISTORY
The script command appeared in 3.0BSD. BUGS
Script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects. AVAILABILITY
The script command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux February 2011 util-linux
All times are GMT -4. The time now is 08:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy