10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I'm working on a script to list all ipv6 from given address
so I've run this script which create hex part of ipv6
STR2=159
END2=200
SUM2=`expr $END2 - $STR2`
for ((i=STR2;i<=END2;++i)); do
x=$( printf "%x" $i ) ; echo $x
echo -e "::"$x >> netpart.txt
done
output is :
::9f... (2 Replies)
Discussion started by: nimafire
2 Replies
2. Shell Programming and Scripting
I have a text file of alphanumeric values listed one by one. I have to convert them to hexadecimal equivalents for each character seperated by ":" in Unix bash shell script. For example, 12345678 has to be converted to 31:32:33:34:35:36:37:38 (10 Replies)
Discussion started by: mathie
10 Replies
3. HP-UX
Hi,
I am a newbie to the UNIX world. I am asked to edit the file in hexadecimal format and save it. Later I should be able to print the file in char mode.
please anyone tell me how to do that mostly using VI editor. (1 Reply)
Discussion started by: vkudire
1 Replies
4. Shell Programming and Scripting
The "hexdump" command cannot perform reverse operation. On the other hand, the "xxd" command with -r option performs reverse hexdump, while the "xxd" command without -r performs the (forward) hexdump. An example of hexdump is to convert ABCD into 41 42 43 44. An example of reverse hexdump is to... (3 Replies)
Discussion started by: LessNux
3 Replies
5. Programming
Let's suppose i have a hexadecimal array with 16 cells.for example
b3e2d5f636111780
i want to convert it to an array of ascii characters(in C) so that
i can reduce total size of the file i want to put it in.
But i am afraid i have not fully understand the difference between ascii
and hex(i... (3 Replies)
Discussion started by: bashuser2
3 Replies
6. Shell Programming and Scripting
I have a requirement, which is as follows
*. Folder contains list of xmls. Script has to create new xml files by copying the existing one and renaming it by appending "_pre.xml" at the end.
*. Each file has multiple <Name>fileName</Name> entry. The script has to find the first occurance of... (1 Reply)
Discussion started by: sudesh.ach
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I have a small script to convert my HexaDecimal Input to Decimal as output.
#!/bin/ksh
hd=00208060
dec=`printf %d $hd`
echo $dec
Output of the above program:
printf: 00208060 not completely converted
16
But my expected output is "2130016".
How can i acheive this.
I... (2 Replies)
Discussion started by: Arunprasad
2 Replies
8. Shell Programming and Scripting
I have a file oratab with entry like this
SCADAG:/esitst1/oracle/product/9.2.0.8:Y
I am trying to discover a way to change the 9.2.0.8 part of this to something like 10.2.0.4 as part of an upgrade script.
I have tried
cat /etc/oratab >>/tmp/oratab... (1 Reply)
Discussion started by: sewood
1 Replies
9. UNIX for Dummies Questions & Answers
I have a .fs file that I want to edit, (or just be able to see what is in it) preferably through a windows environment. Does anyone know how to do that? Thanks (4 Replies)
Discussion started by: kiterboy
4 Replies
10. Shell Programming and Scripting
I have a record in a file that ends with the new line character "\n". How dio I determine the hexadecimal value for that? (2 Replies)
Discussion started by: lesstjm
2 Replies