02-12-2007
Since it is binary data, it may contain "characters" that have any ascii value (including, possibly, 0). Don't use the strxxx functions as they use these as delimiters. You could look at the memcpy family instead.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to know how to record the hostname, date/time and all of the process and send it all to one file. I know that the commands I need are hostname, date and ps but I don't know how to do them all and send them all to the same file. Please help! (1 Reply)
Discussion started by: precious51980
1 Replies
2. UNIX for Advanced & Expert Users
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)
Discussion started by: krishna
4 Replies
3. Shell Programming and Scripting
Hi,
Am trying to write a shell script which will append a header and a footer to an existing file. Header will contain details like the current date while the footer will contain the no: of records listed in the file.
I know we can use the CAT command, but i have no clue abt the syntax to... (4 Replies)
Discussion started by: brainstormer
4 Replies
4. Shell Programming and Scripting
Hi
I need to write a script where there the user enters 3 input parameter
variable
number
the program should ask the user left or right
if it is left , the number specified that many spaces should be added to the value in front of the value and saved in the samee variable itself and if it is... (5 Replies)
Discussion started by: viv1
5 Replies
5. Shell Programming and Scripting
Hi.
I wrote a very simple script and it doesn't work :(
It is supposed to go to a certain directory, execute some command and append the output to the file "expo.dat"
what it does is that it writes to the file only one entery. I dont know if Im using the write synthax for "append". Here is... (3 Replies)
Discussion started by: Enigma08
3 Replies
6. Shell Programming and Scripting
Hi,
I would like to know if it's possible to append data into a variable, rather than into a file. Although I can write information into a temporary file in /tmp, I'd rather if possible write into a variable, as I don't like the idea that should my script fail, I'll be polluting the server with... (5 Replies)
Discussion started by: michaeltravisuk
5 Replies
7. Shell Programming and Scripting
I am calling SQL script in my UNIX Shell script and trying to create the CSV file and my last column value of each row is 23 blank spaces.
In my SQL script,the last column is like below.
RPAD(' ',23,' ') -- Padding 23 blank Spaces
The CSV file is generated but the sapce(23 spaces) is... (2 Replies)
Discussion started by: praka
2 Replies
8. Shell Programming and Scripting
I have on file abc.txt
abc.txt:
20090807
Now I want to delete empty lines which has tap/whit spaces from abc.txt .and store the date value in the file into variable.some processs will update the this file with some date . if the process updtes thiis file with empty string , write the... (3 Replies)
Discussion started by: Gopal_Engg
3 Replies
9. Shell Programming and Scripting
Version Info
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
$
$ echo $0
-ksh
I was trying to append date to the file name. The following syntax has worked
$ touch HELLO-`date '+%d-%b-%Y'`.txt
$ ls -alrt HELL*
-rw-r--r-- 1 rlapp oinstall 0 Feb 20... (2 Replies)
Discussion started by: John K
2 Replies
10. Shell Programming and Scripting
Hi
I have a file called text.txt contains
x
y
z
when i run a command i will get output like below
x 20
z 30
i want to insert x, z value in text.txt file and should be like this
x 20
y 0
z 30
can anyone help me please? (1 Reply)
Discussion started by: siva kumar
1 Replies
LEARN ABOUT HPUX
cmpt_get_addrcid
cmpt_get_ifcid(3) Library Functions Manual cmpt_get_ifcid(3)
NAME
cmpt_get_ifcid(), cmpt_get_addrcid() - get the compartment IDs associated with a network interfaces
SYNOPSIS
Parameters
ifname Pointer to network interface name string.
family Address family of the ipaddress specified. Currently, the AF_INET and AF_INET6 address families are supported.
addr Points to a buffer holding an IPv4 address if the family argument is AF_INET or an IPv6 address if the family is AF_INET6.
The address should be in numeric format in the network byte order. Numeric format is the binary value that goes into a
socket address structure.
The binary value is the hex representation of the IPv4/IPv6 address. This binary value resides in the structure for IPv4
address and in the structure for IPv6 address. (See inet(3N) for more details.)
mask Network mask in the CIDR representation.
DESCRIPTION
The function returns the compartment ID associated with a network interface.
The function returns the compartment ID of the tuple as set by a previous invocation of the command.
RETURN VALUE
The functions and return the following values:
Successful completion.
n is the compartment of the interface or the tuple.
Function failed.
may be set to indicate the error.
ERRORS
If any of the following conditions occur, and fails and sets
Compartmentalization feature is not supported.
The process does not have the appropriate privilege.
See privileges(5).
Specified interface or the address tuple has no compartment mapping.
Specified mask or family is invalid.
DEPENDENCIES
These functions are a part of the library.
SEE ALSO
compartments(4), compartments(5), privileges(5).
cmpt_get_ifcid(3)