Hi dasun...
As a starting point you could try something like this and is fully POSIX compliant...
Longhand on OSX 10.14.3, default bash terminal calling dash purely as a demonstration:
This ASSUMES you want the whole of (binary1) string replacing.
Friends,
I've tried on solaris, but I could n't get ascii data
dd if=binaryinputfile bs=1 skip=3800 count=4 | od -t u4
output :
INDBU3:/usr/users/FTAMUSER/kk $
dd if=SMP20041006173649188151 bs=1 skip=3800 count=4 | od -t u4
4+0 records in
4+0 records out
0000000 0000000000
0000004... (4 Replies)
Hi everybody. I need help and I hope someone is willing to help me out here.
My wholesale company is currently moving to new software. The old software is running on a UNIX platform. We need to migrate data from the UNIX system, but our former software provider refuses to assist the data... (5 Replies)
Hi All,
Please help me out with a script which checks whether a given file say abc.txt is in ASCII format and data is tab-delimited. If the condition doesn't satisfy then it should generate error code "100" for file not in ASCII format and "105" if it is not in tab-delimited format.
If the... (9 Replies)
hi
i am receiving a file from one system , i have to verify the format of the file data i.e whether the data is in acii format or binary format,
please help
thanks in advance
satya (1 Reply)
Hi All,
Please let me know if it is possible to convert data from ASCII to Packed Decimal through Unix?
Basically we have ASCII file with numeric data we want to convert that files data to Packed decimal format to send it to main frame.
Please let me know if we can do it through unix script.... (1 Reply)
I have an ASCII 28 delimited text file(non-printable delimiter) with 4 columns along with the header.I need to open this text file in Excel or any other tool to view each column content.
Please help..
Thanks (6 Replies)
Hi,
I want to convert ebcdic values to ascii values. Are there anyany specific c++ libraries with g++ compiler, which can do it ?
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54) (0 Replies)
Hello,
With bash-script (ubunto server) I'm trying to read a binary file and, for each character, give back its ascii code (including extended ascii). For example:
HEX => ASCII => PRINT
f5 => 245 => õ
50 => 80 => P
To load the binary file into a variable I tried in this way: ... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi Guys,
I am new on the scripting world and would like ask for help if you can.
Here are my questions... (1 Reply)
Discussion started by: mahiwaga
1 Replies
LEARN ABOUT HPUX
inv
vis(1) General Commands Manual vis(1)NAME
vis, inv - make unprintable and non-ASCII characters in a file visible or invisible
SYNOPSIS
file ...
file ...
DESCRIPTION
reads characters from each file in sequence and writes them to the standard output, converting those that are not printable or not ASCII
into a visible form. inv performs the inverse function, reading printable characters from each file, returning them to non-printable or
non-ASCII form, if appropriate, then writing them to standard output;
Non-printable ASCII characters are represented using C-like escape conventions:
backslash
backspace
escape
form-feed
new-line
carriage return
space
horizontal tab
vertical tab
the character whose
ASCII code is the 3-digit octal number n.
the character whose
ASCII code is the 2-digit hexadecimal number n.
Non-ASCII single- or multi-byte characters are examined one byte at a time. For each byte, if it can be displayed as an ASCII character,
it is treated as if it is an ASCII character; Otherwise, it is represented in the following conventions:
the 8-bit character whose
code value is the 3-digit octal number n.
the 8-bit character whose
code value is the 2-digit hexadecimal number n.
Space, horizontal-tab, and new-line characters can be treated as printable (and therefore passed unaltered to the output) or non-printable
depending on the options selected. Backslash, although printable, is expanded by vis, to a pair of backslashes so that when they are
passed back through inv, they convert back to a single backslash.
If no input file is given, or if the argument is encountered, and inv read from the standard input.
Options
and recognize the following options:
Treat new-line, space, and horizontal tab as non-printable characters.
expands them visibly as and rather than passing them directly to the output. discards these characters, expecting only the
printable expansions. New-line characters are inserted by every 16 bytes so that the output will be in a form that is
usable by most editors.
Make and silent about non-existent files, identical input and output, and write errors. Normally, no input file can be the same
as the output file unless it is a special file.
Treat horizontal-tab and space characters as non-printable
in the same manner that treats them.
Cause output to be unbuffered (byte-by-byte);
normally, output is buffered.
Cause output to be in hexadecimal form rather than the default octal form. Either form is accepted to as input.
EXTERNAL INFLUENCES
Environment Variables
determines the language in which messages are displayed.
International Code Set Support
Single- and multi-byte character code sets are supported.
WARNINGS
Redirecting output to an input file destroys the original data. Therefore, command forms such as
should be avoided unless the source file can be safely discarded.
AUTHOR
was developed by HP.
SEE ALSO cat(1), echo(1), od(1).
vis(1)