04-27-2012
While we're at it - try the nl command
10 More Discussions You Might Find Interesting
1. Solaris
All,
After a power loss I went to power on our sun fire v120 that is running solaris 10 and now it will not boot. I tried power cycling it from the lom and pulling the cord but nothing works. All it does is after a power cycle it will start to boot and then start to spit out a bunch of hex... (2 Replies)
Discussion started by: jsandova
2 Replies
2. Shell Programming and Scripting
I met a problem in using grep -P.
There is a text file, temp.txt, whose content is:
dddd
abc
I ran the command:
grep -P "\s*abc" temp.txt
The result I expected is:
abc
But, the actual result is:
dddd
abc
Could anyone tell me what is wrong?
Thanks. (2 Replies)
Discussion started by: pankai
2 Replies
3. OS X (Apple)
I use rsync to keep a directory in synchronization betwen a Linux box with the hostname brutal and a Mac running OS X 10.5 (Leopard) with the hostname cooper. When I run the following command on my Linux machine:
rsync -avz --delete myuserid@cooper:/Library/WebServer/Documents... (2 Replies)
Discussion started by: scotbuff
2 Replies
4. UNIX for Dummies Questions & Answers
ok, there's a script i'm working on written in shell programming. #!/bin/sh
this script is written to spit out the contents of certain variables inside of it so the output looks something like this:
server01=89 server02=69 server03=89 server04=76
now, when i run this script from the... (4 Replies)
Discussion started by: SkySmart
4 Replies
5. UNIX for Dummies Questions & Answers
Hi there,
I'm using putty to connect to several servers. On every remote machine, the home key takes me at the beginning of a command line. Exept on one machine where a press on the home key outputs the tilde sign (~). Is there any place where I can override this behavior, I really prefer my... (6 Replies)
Discussion started by: chebarbudo
6 Replies
6. Shell Programming and Scripting
Hi Experts
I am facing a weird issue while using print statement in awk. I have a text file with 3 fields shown below:
# cat f1
234,abc,1000
235,efg,2000
236,jih,3000
#
When I print the third column alone, I dont face any issue as shown below:
# awk '{print $3 }' FS=, f1
1000
2000... (5 Replies)
Discussion started by: guruprasadpr
5 Replies
7. UNIX for Dummies Questions & Answers
Hi I am getting absurd behavior of escape character in echos as followed:oinlcso003{arsadm} #: echo "\as shdd"
\as shdd
oinlcso003{arsadm} #: echo "Well, isn't that \"special\"?"
Well, isn't that "special"?
oinlcso003{arsadm} #: echo "Well, isn't that \special\?"
Well, isn't that \special\?... (3 Replies)
Discussion started by: nixhead
3 Replies
8. UNIX and Linux Applications
Why could whatprovides not lookup this info for over 10 minutes, but install could install that package in less than a minute?
$ yum whatprovides */lsb_release
Loaded plugins: langpacks, presto, refresh-packagekit, versionlock
^Cupdates/group 18% 3.1 kB/s | 360 kB 08:28 ETA ... (0 Replies)
Discussion started by: cokedude
0 Replies
9. UNIX for Advanced & Expert Users
Can someone please explain what's wrong with the command i use below?
tr -c '\11\12\40-\176' ' '< $TEMP_FILE > $TEMP_FILE2
The invalid character/s is replaced with two spaces, the string2 only have 1 space in it. Please help.
Sample output:
333243,333244c333243,333244
< ... (1 Reply)
Discussion started by: Jin_
1 Replies
10. Shell Programming and Scripting
This really puzzles me. The following code gives me the error 'expr: syntax error' when I try to do multi-line comment using here document
<<EOF
echo "Sum is: `expr $1 + $2`"
EOF
Even if I explicitly comment out the line containing the expr using "#", the error message would still exist... (3 Replies)
Discussion started by: royalibrahim
3 Replies
portal(5) File Formats Manual portal(5)
NAME
portal - a "window to the future" for applications
SYNOPSIS
DESCRIPTION
This header file is a "window to the future" for applications. It will help you to:
o Write code that is portable across 32-bit and 64-bit systems,
o Avoid undocumented assumptions about sizes of integral types,
o Write portable code that needs to be explicit about the sizes of integral types,
o Write code that is portable to a platform which has different sizes of integral types, and
o Share frequently used macros that are portable across 32-bit and 64-bit systems.
In addition to the macros defined in this file, it includes the header files (see limits(5)) and (see inttypes(5)).
The following macros are defined in
This macro can be used to create a mask that has one bit set.
bit_num is the position of the bit to set, and type is the data type of the mask. A -1 is returned in the case of overflow or
underflow.
This macro can be used to set a bit in a mask.
mask is the current value of the mask, bit_num is the position of the bit to set, and type is the data type of the mask.
This macro can be used to return the bit position
of the sign bit for the specified data type. type is the data type for which to return the position of the sign bit.
This macro can be used to return a mask for the sign bit for
the specified data type. type is the data type for which to return the sign bit mask.
This macro can be used to do a sign extension from one
data type to another. value is the current value that is to be sign-extended. old_type is the current data type of value and
new_type is the new data type of value.
This macro can be used to check if code has been
compiled big or little endian. endian is an integer in which the result will be returned.
The following macros can be used for print formatting and scan formatting of values of data types that can change in size based upon the
compilation flag Examples of such data types are off_t and fpos_t.
EXAMPLES
The macro in the following example will turn on the high bit in a 64-bit integer.
The macro in the following example will be used to turn on all bits except the sign bit in a 32-bit integer.
The macro in the following example will turn on the three least significant bits of the maximum integer.
The macro in the following example will return the position of the sign bit in a 32-bit integer.
The macro in the following example will return a sign bit mask for a 32-bit integer.
The macro in the following example will convert the 8-bit integer stored in a char data type to a 64-bit integer and correctly extend the
sign.
The macro in the following example will store a 1 in endian if the compilation was big endian; otherwise, it will store a 0 in endian.
AUTHOR
was developed by HP.
FILES
SEE ALSO
inttypes(5), limits(5), printf(3S), scanf(3S).
portal(5)