Sponsored Content
Top Forums Shell Programming and Scripting How to prevent the pattern "^[[0m" from being written to a file ???? Post 302244042 by jim mcnamara on Tuesday 7th of October 2008 04:42:30 AM
Old 10-07-2008
That is an escape sequence = escape[0m escape = ^[

Escape sequences do funny things to terminal output, like change the color for example.
You probably have different escape sequences being sent to the terminal. Trap the ouput in od:
Code:
grblib somefile.cpp | od -c

This will let you see exactly what is being output
ansi escape sequences:

ASCII Table - ANSI Escape sequences

Finally once you know which bits of garbage to filter, you can use sed to filter them out.
Code:
grblib somefile.cpp | sed 's'/<garbage>//g'

I do not know what junk is being produced.

Note: You may also want to check your terminal settings.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error : "No data written to object that was write locked"

Hi All, I was able to solve my previous problem (link directory)... but now i have this following problem. I have mounted a disk from other machine using "mount -F nfs" command. When i run a batch which generates some files in that drive.... after a certain number of files i get... (1 Reply)
Discussion started by: nileshkarania
1 Replies

2. HP-UX

Apache w/ "Coverity Prevent" cannot start... please hellp!

Hi, I am trying to start the apache server on 11i for Coverity Prevent using following command: # cov-start-gui --datadir /qa_home/coverity/data_dir-4.3.0 cov-internal-httpd not running. For further information, see '/qa_home/coverity/data_dir-4.3.0/logs/error_log' # the error_log... (0 Replies)
Discussion started by: prits31
0 Replies

3. Shell Programming and Scripting

how to prevent "ctrl-C" input

Hi I have a script and its execution takes 40 - 60 minutes. The script is run on the console window of the machine. Script execution should not be broken by running ctrl-C under any circumstances. Is there a way to lock the window from any user input (ctrl-C in fact) till the end of the script... (3 Replies)
Discussion started by: aoussenko
3 Replies

4. AIX

AIX - "prevent script from running twice" issue

I know about standard "ps ..|grep .. | grep -v grep" solution, but... this is different issue I have encountered in several companies I worked for. And I see this only for AIX - not HP, not Solaris, not Linux. Korn shell script is scheduled in the background (via cron /via Tivoli Scheduler or... (6 Replies)
Discussion started by: ooops
6 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

look for file size greater than "0" of specific pattern and move those to another directory

Hi , i have some files of specific pattern ...i need to look for files which are having size greater than zero and move those files to another directory.. Ex... abc_0702, abc_0709, abc_782 abc_1234 ...etc need to find out which is having the size >0 and move those to target directory..... (7 Replies)
Discussion started by: dssyadav
7 Replies

7. Shell Programming and Scripting

awk script does not work when written as "one-liner"

In my quest to solve a bigger problem (See my previous post called "Create SQL DML insert statements from file using AWK or similar" - sorry, not allowed to post urls until I have > 5 posts) I'm trying to get my head round awk, but have some problem figuring out why the following script does work... (2 Replies)
Discussion started by: Yagi Uda
2 Replies

8. UNIX for Dummies Questions & Answers

Egrep confusion with "I" and "-I" pattern

I am executing following command egrep -w I filename.txt the filename.txt has following data .... -I 07-18 08:31:19.924 9880 6 SessionManager ConnectConfig: ConfigurationWebService LoginResults=SuccessfulLogin I am so hungry that I need to eat I expect egrep to print only the second... (1 Reply)
Discussion started by: VBG
1 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
jistoeuc(1)							   User Commands						       jistoeuc(1)

NAME
jistoeuc, jistosj, euctojis, euctosj, sjtojis, sjtoeuc - Code conversion between JIS, PC kanji, and Japanese EUC SYNOPSIS
jistoeuc [-8] [-U] [filename...] jistosj [-8] [-U] [filename...] euctojis [-8] [-U] [filename...] euctosj [-U] [filename...] sjtojis [-8] [-U] [filename...] sjtoeuc [-U] [filename...] AVAILABILITY
SUNWjfpu DESCRIPTION
For Japanese language handling, the jistoeuc family provides conversion between different code standards. command [ filename ...] does the specified conversion on the contents of the input filenames and writes it to stdout. If filename is not given, it reads and converts characters from the standard input. jistoeuc converts JIS to Japanese EUC jistosj converts JIS to PC kanji euctojis converts Japanese EUC to JIS euctosj converts Japanese EUC to PC kanji sjtojis converts PC kanji to JIS sjtoeuc converts PC kanji to Japanese EUC OPTIONS
-8 With this option specified, the commands jistoeuc, jistosj, sjtojis, and sjtoeuc, can support JIS X 0201 (Half-Size Katakana). This 8-bit JIS code does not use ISO Shift-In and Shift-Out escape sequences. -U The output is not buffered (The default is buffered output). SEE ALSO
iconv(1), iconv_ja(5) NOTES
This command can handle shift-in escape sequences for the following character sets: JIS X 0208 shift-in escape - E$B, E$(B, E$@ JIS X 0212 shift-in escape - E$(D JIS X 0201 Roman shift-in escape - E(J, E(H ASCII shift-in escape - E(B euctojis and sjtojis can handle shift-in escape sequences for the following character sets: JIS X 0208 shift-in - E$B JIS X 0212 shift-in - E$(D (except when sjtojis command is specified) JIS X 0201 Roman shift-in - E(J jistoeuc does not check whether or not each code in the input file is correct. Conversion with PC kanji is not based on TOG Japanese Ven- dors Council (TOG/JVC) Recommended Code Set Conversion Specification between Japanese EUC and Shift-JIS. The iconv(1) utility provides these functions. See iconv(1) and iconv_ja(5) for more information. BUGS
If JIS X 0212 character set is specified as input, jistosj and euctosj can not support the conversion correctly. euctosj, sjtoeuc, jis- tosj, and sjtojis can support conversion correctly only if JIS X 0208 1 ku - 84 ku is specified as input. SunOS 5.10 10 Jan 2003 jistoeuc(1)
All times are GMT -4. The time now is 01:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy