Print Terminal Output Exactly how it Appears in the Terminal to a New Text File
Hello All,
I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly.
Is there any way to take the output from the cat command, exactly how it is displays in the terminal and print it to another text file...?
So basically it would be like the new text file contains the interpreted output of the first file. Almost as though I just copy and pasted the terminal output to a text file, so the new text file wouldn't show the control characters... Does that make sense?
For example: One line from file1.txtContains:
Then `cat` prints:
I've tried a few different things like redirection of cat, the tee command, and 'echo -e' like this:
But nothing is getting me the results I'm looking for.
Each new file that gets written to from the attempts I mentioned above, contains the EXACT same data as the original file.
If anyone has ANY thoughts or suggestions, it would be greatly appreciated.!
Hi all
The makefile of a large project produces hundreds of lines of output, which I can't look at any more when the build is finished. If I simply redirect the output to a file, I can't see the progress of the building process...
Is there a possibility to redirect the output to a file and at... (1 Reply)
I have a window open on my ultra 10 - a terminal window connecting to a server.
Is there any way I can log all output to this window to a log file on my ultra 10 ? (2 Replies)
Hey,
How can I transfer the terminal output to a file ?
For example :
command "fuser" returns the "process-id" and prints the output on the terminal, but I want that output to a file as well. How can I do that ?
/clocal/mqbrkrs/user/mqsiadm/sanjay/AccessMonitor $ fuser -uf... (2 Replies)
I would like to use a terminal session to ssh to switches and routers. I need to capture data while logged into switches to a file I can email for troubleshooting.
I use termial to log into Cisco switch, run the sh tech command, and then sent the output to cisco. Is there a way to run a... (4 Replies)
I want to have a terminal open and have something like a "repeating cat" command running in it for a certain text file (in particular /var/log/system.log). So my terminal will scan or cat the text file every so often or whenever the text file system.log gets written to by the system, it will... (1 Reply)
(/home/user1)-> more script.sh
#!/bin/ksh
( echo open devicename
sleep 3;
echo user;
sleep 2;
echo password;
sleep 2;
echo "/info/dump"; ---------> This needs to redirect to a file .Can be number of pages
sleep 2;
echo "exit" ) | telnet
Please use code tags next time for... (2 Replies)
Hi all !
I noticed something very weird.
I have a large pipe delimited file (20 fields/3,000 records) that looks like that:
AAA|BBB|11111|22222|...|($NF of record 1)
CCC|DDD|33333|44444|...|($NF of record 2)
CCC|DDD|55555|66666|...|($NF of record 3)
For the lines with same 1st and 2nd... (3 Replies)
I am having a bash script which is basically invoking a python program to validate the Source Query results against the target query results. I am placing all the queries in a .sql file.
I want to write to a Error log file incase if the syntax is wrong or if the column is not present in the... (4 Replies)
Hi,
I have text file with the header like this
tracking_id condition replicate FPKM
XLOC_000001 alpha 1 10.3199
XLOC_000001 alpha 0 10.3686
XLOC_000001 alpha 2 15.5619
...
With the first column being genes, the second being the condition, the third... (5 Replies)
I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies
LEARN ABOUT DEBIAN
cadubi
cadubi(1) User commands cadubi(1)
others.
NAME
cadubi - Creative ASCII Drawing Utility By Ian
DESCRIPTION
cadubi is an application written in Perl that allows you to draw text-based images that are viewable on typical UNIX-based consoles. Usu-
ally the applications that emulate these consoles support various text modes, such as background and foreground colors, bold, and inverse.
This text art, commonly called "ASCII art", is used in various places such as online BBSes, email and login prompts.
OPTIONS -h --help
display some documentation
-m--mute
turn off beeping
-s [W] [H]
--size [W] [H]
sets the size of the console for use with cadubi, where W is number of columns and H is number of rows.
-v --version
show cadubi's version
CONFIGURING
Beeping and command line options can be also set in /usr/bin/cadubi.
KEYBOARD
i j k l
Move the cursor around. Holding down shift and typing these keys will move the ursor five spaces instead of one.
space Paint the current pen on the screen.
return/enter
Move the cursor down one line and all the way to the left of the console.
delete or backspace or `
Delete the character before the cursor.
p Prompt for a pen character
f Prompt for foreground color (see section colors).
b Prompt for background color (see section colors).
g Toggle bold mode.
v Toggle inverse mode.
shift-w
Toggle blink (highly annoying).
t Enter text mode. This allows you to type like as if you were using a normal text editor, and all the characters drawn onscreen will
use the same mode as the pen Pressing Esc will exit text mode.
control-w
Refresh the entire screen by redrawing each character.
control-r
Open a file.
control-o
Save the file.
control-h
Show the quick help screen.
control-x
Exit cadubi.
USING
Cadubi has a 'pen' which describes the current mode. Properties of the pen are the painting character, foreground color, background color,
bold, inverse, and blink. Whenever you paint or use the text mode, the characters drawn on the screen will have the properties of the pen.
The current mode of the pen is shown at the bottom of the console and is what will be drawn on screen when you paint. Typically, fore-
ground text colors are the same as background colors, unless the text is bold. If the text is bold, foreground colors are usually lighter
than the background color, making text easier to read when the text has the same foreground and background color. Refer to the Quick Help
(control-'h') to see what the colors look like on your console.
Text mode is an extremely useful feature. Once in the text mode you can type as if you were using a normal text editor, and all the charac-
ters drawn onscreen will use the same mode as the pen. To enter text mode, press the 't' key. To exit, press escape.
When cadubi reads a file, it will only read as much that will fit in the workspace (the area of the console minus the bottom row [status
bar]). To gain more workspace, see the '-s' operator in section "options".
Cadubi optimizes its output files to display properly and take up as little space as possible. All cadubi output can be viewed with the
'cat' utility.
COLORS
The color codes are case-insensitive. The following color codes can be chosen as fore- or background colors:
0 or N - Normal (standard text)
1 or W - White
2 or R - Red
3 or G - Green
4 or Y - Yellow
5 or B - Blue
6 or M - Magenta
7 or C - Cyan
8 or K - Black
WARNING
Cadubi uses escape sequences for things like color. These may differ from system to system. This means that the file generated by cadubi
may trash your console when viewed with for example cat. It is generally safe to use the files on the same type of console as they were
generated on.
AUTHORS
Cadubi was created and is currently being maintained by Ian Langworth. Please send all questions, comments, hate mail and bug reports to
cadubi@logicallemon. com
SEE ALSO
The "Keyboard and Console HOWTO" and the "Text Terminal HOWTO" from the Linuxdoc project (www.linuxdoc.org). Both are available in a Debian
GNU/Linux system by installing the doc-linux-text package at /usr/share/doc/HOWTO/en-txt/Keyboard-and-Console-HOWTO.gz and
/usr/share/doc/HOWTO/en-txt/Text-Terminal-HOWTO.gz respectively.
This man page was copy-pasted from other documentation by Abel Daniel (abli@mai lbox.hu) for the Debian GNU/Linux distributions, but can be
used by others.
Abel Daniel 1.1b1-4 cadubi(1)