Sponsored Content
Full Discussion: File encoding in Unix
Top Forums UNIX for Dummies Questions & Answers File encoding in Unix Post 302164118 by ssmallya on Monday 4th of February 2008 03:36:56 AM
Old 02-04-2008
Power File encoding in Unix

1. I have a shell script which creates a file using cat command. How can i find what encoding the file follows (e.g. UTF8, ANSI)?

2. I want to convert that file to PC-ANSI format. How can i achieve that?

I am using HP-Unix.
 

10 More Discussions You Might Find Interesting

1. Solaris

no SOAP encoding under unix?

Under Unix however we had many many many many problems. We had to use Ansi2utf8(), repstr() and XMLval() to prevent "Invalid token" errors. And because we didn't know what the raw XML result was, it allways was a big problem to find the cause of it. (0 Replies)
Discussion started by: devotedsinner
0 Replies

2. Shell Programming and Scripting

get the file encoding

Hello! The system is AIX 5.3 Give please command or script to get the file encoding Thanks (2 Replies)
Discussion started by: vinment
2 Replies

3. AIX

get the file encoding

Hello! The system is AIX 5.3 Give please command or script to get the file encoding (1 Reply)
Discussion started by: vinment
1 Replies

4. Shell Programming and Scripting

Cygwin vi XML file encoding problem

Hi, I have got a zip (binary) file transferred from MacOS (thus it has additional __MACOSX directory packed inside). On extracting this zip, there are few *.xml files available. When I opened this *.xml file in vim editor using Cygwin (on windows) the editor displayed in the bottom. I tried... (4 Replies)
Discussion started by: royalibrahim
4 Replies

5. HP-UX

how to find the character encoding of a file in hp_ux

how to find the character encoding of a file in hp_ux (1 Reply)
Discussion started by: alokjyotibal
1 Replies

6. Shell Programming and Scripting

How to find the file encoding and updating the file encoding?

Hi, I am beginner to Unix. My requirement is to validate the encoding used in the incoming file(csv,txt).If it is encoded with UTF-8 format,then the file should remain as such otherwise i need to chnage the encoding to UTF-8. Please advice me how to proceed on this. (7 Replies)
Discussion started by: cnraja
7 Replies

7. UNIX for Dummies Questions & Answers

Determing the encoding of a file

Hi, I am trying to determine the encoding for the file, because to convert to UTF-8, it seems as though I have to know the encoding of the source. Tried this file <filename> give me this: <filename>:data or International Language text Tried to see the locale and this is the output:... (6 Replies)
Discussion started by: MIA651
6 Replies

8. Shell Programming and Scripting

Arabic encoding using Unix commands

I am using sed on Arabic file (utf-8 encoding) like bellow: sed 's/./& /g' file and all I get is: 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? I tried change the LANG variable to LANG=en_US.UTF-8 but I still get the same "?" output. What is the... (1 Reply)
Discussion started by: Viernes
1 Replies

9. Solaris

View file encoding then change encoding.

Hi all!! I´m using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . I´m expecting / looking an output as UTF8 or ANSI / ASCII Is there command to display the files encoding? Thank you! (2 Replies)
Discussion started by: mrreds
2 Replies

10. Shell Programming and Scripting

How to know file encoding?

how can i know what format a file is * example: UTF-8 ANSI UCS2 i am in a... (8 Replies)
Discussion started by: tricampeon81
8 Replies
logtool(1)						      General Commands Manual							logtool(1)

NAME
logtool - parse and filter syslog files SYNOPSIS
(stdout) | logtool -[args] Logtool is a command line program that will parse logfiles into a more palatable format. It will take anything resembling a syslog or mul- tilog file, as well as unformatted ASCII, and crunch it into one of the following formats for your viewing pleasure: ANSI (colorized for easy "at a glance" viewing) ASCII (e-mail reports/term's w/o color) CSV (spreadsheet/database imports) HTML (for generating web pages) RAW (for no good reason) OPTIONS
-o [ ANSI | ASCII | CSV | HTML | RAW ] Allows you to specify the output format to be one of the following: ANSI (default), ASCII, CSV, HTML, RAW. Options are not case sen- sitive (ie: -o CSV and -o csv should yield the same results) -t [ long | short ] Allows you to specify the time display format to be one of the following: (Long [default]) Mon Dy HH:MM:SS or (Short) HH:MM -b Causes logtool to beep on RED events (ANSI output only). This is usefull when you want to monitor a logfile on an ongoing basis, and wish to have your terminal beep whenever something out of the ordinary happens. -s Causes logtool to not display the syslog "source" field -p Causes logtool to not display the "program" field -c [/path/config.file] Allows you to specify a config file other than the default /etc/logtool/logtool.conf -i [/path/includefile] Allows you to specify an alterate file containing regex's for inclusion [default=/etc/logtool/include] -e [/path/excludefile] Allows you to specify an alternate file containing regex's for exclusion [default=/etc/logtool/exclude] -n Causes logtool to skip any attempts to resolve IP->Hostname by the various modules (handy when your DNS is down temporairly). -v Set logtool to operate in verbose mode (does nothing currently) -V Causes logtool to print it's version information and exit -h Display the help message SUGGESTED USAGE(S) As a 'live' logfile monitoring tool: tail -f /var/log/messages | logtool -o ANSI -b To generate colorized webpages of logfiles: cat /var/log/messages | logtool -o HTML > /home/httpd/html/logs/messages.html To generate reports via a cronjob: retail /var/log/messages | logtool -o ASCII | mail -s "Daily report" someuser@somedomain.ext CONFIG FILE
/etc/logtool/logtool.conf The config file should be commented to the point of being self-documenting, so we will not comment very extensively on it here. Suffice to say, this is the place where you should configure 99% of your runtime options for logtool. You may also have a collection of different default configurations, and select amongst them by the '-c' option of logtool. AVAILABILITY
Logtool is known to compile/run on all UNIX flavors using a 2.95.x GNU C Compiler, the GNU Make utility, and a proper ANSI C library (glibc is recommended, but not required). Specific reports of success include FreeBSD, OpenBSD, Solaris, SunOS, AIX, SCO, and of course, any known flavor of Linux (including at least 2 embedded system variants). SEE ALSO
regex(7) for help with constructing regular expressions for the include/exclude/colors files. If you find no regex manual on your system, try 'apropos regex' and see what you get, or as a last ditch, 'man grep' should at least point you in the right direction. You can also find a somewhat better bit of documentation in the textfile 'logtool.txt' (usually in the /usr/doc/, /usr/share/doc/ or simi- lar tree on most Linux distributions). If you don't know where to look, you can probably find it by typing 'locate logtool.txt' at the command line. AUTHOR
A.L.Lambert <al@xjack.org> LOCAL logtool(1)
All times are GMT -4. The time now is 06:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy