10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
when given a file name, im looking for the most efficient way to turn each letter of the file name into spaces.
for instance, the way im thinking of going about this is this:
MYFILE=check_disks.sh
CHANUM=$(echo ${MYFILE} | awk '{ print length }')
printf '%s\n' $CHANUM
as you can see... (4 Replies)
Discussion started by: SkySmart
4 Replies
2. Shell Programming and Scripting
Hi All,
I 'm matching two files based on the first 2 columns and then populate other fields along with subtraction of few fields.
I have managed to get the output. However, is there a easier way in formatting the output as shown below instead of using additional printf for getting fixed width... (4 Replies)
Discussion started by: shash
4 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have following files in a directory with '.meta' extension, which have data in follwoing patterns. i need to print data from these files in below metioned format. please provide a script for this solution.
file names:
TEST_HISTORY_MTH.meta
AB_TEST_1.meta
cat... (2 Replies)
Discussion started by: AAHinka
2 Replies
4. UNIX for Dummies Questions & Answers
Hi
I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
Discussion started by: a_bahreini
3 Replies
5. UNIX for Advanced & Expert Users
The below line gives the perfect output when I mention the record number and file name as hardcoded.
awk 'NR==3{print}' samp2.txt
But when I pass the record num and file name as variable, it doesn't give any output.
row_num=3;file2=samp2.txt;awk 'NR==$row_num {print}' $file2
Can you... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies
6. Solaris
Hi,
how do I query available printer options and set defaults for my print requests?
I have found lpoptions (man lpoptions(1)) on the web but it doesn't seem to be available under Solaris and I can't work out how else to do it.
Thanks,
Bob (2 Replies)
Discussion started by: BobD
2 Replies
7. UNIX for Dummies Questions & Answers
At work, when I issue:
lpr -P$PRINTER -h filename
the file always prints a line then does a vertical tab off that first line instead of starting the new line at left.
It does this with every file I've tried, and I can't find any options that are set that would make things print this way.
I... (2 Replies)
Discussion started by: scaredinjuly
2 Replies
8. Shell Programming and Scripting
Hi,
I have a script that fetches only specific information from fcinfo command. Below is a portion of the script.
#!/usr/bin/ksh
set -x
HBA_COUNT=`sudo fcinfo hba-port | grep -i state | awk 'END{print NR}'`
echo "$HBA_COUNT HBAs exist"
echo '........'
INDEX=1
while $INDEX -le... (2 Replies)
Discussion started by: jake_won
2 Replies
9. Shell Programming and Scripting
I have this files:
./frm/lf_mt1_cd.Ic_cell_template.attr
./die/addgen_tb_pumd.Ic_cell_template.attr
./min_m1_n.Ic_cell_template.attr
When I use:
awk -F\/ '{print NF}'
Would result to:
3
3
2
I would like to list the files with 3 fields on it. Any Suggestions? (1 Reply)
Discussion started by: jehrome_rando
1 Replies
10. UNIX for Advanced & Expert Users
The following C++ code segment is not working in debug mode build on HP-UNIX machine. It is not printing "Hello World" message on the screen. While it is working fine in release mode build.
==============================================
class KLogStreamBuf : public streambuf {
public:... (0 Replies)
Discussion started by: heena
0 Replies
graph(1) User Commands graph(1)
NAME
graph - draw a graph
SYNOPSIS
graph [ -a spacing [start]] [-b] [-c string] [-g gridstyle] [-l label] [-m connectmode] [-s] [ -x [l] lower [ upper [spacing]]] [ -y [l]
lower [ upper [spacing]]] [-h fraction] [-w fraction] [-r fraction] [-u fraction] [-t] ...
DESCRIPTION
graph with no options takes pairs of numbers from the standard input as abscissaes and ordinates of a graph. Successive points are con-
nected by straight lines. The standard output from graph contains plotting instructions suitable for input to plot(1B) or to the command
lpr -g (see lpr(1B)).
If the coordinates of a point are followed by a nonnumeric string, that string is printed as a label beginning on the point. Labels may be
surrounded with quotes "...", in which case they may be empty or contain blanks and numbers; labels never contain NEWLINE characters.
A legend indicating grid range is produced with a grid unless the -s option is present.
OPTIONS
Each option is recognized as a separate argument. If a specified lower limit exceeds the upper limit, the axis is reversed.
-a spacing[ start ] Supply abscissaes automatically (they are missing from the input); spacing is the spacing (default
1). start is the starting point for automatic abscissaes (default 0 or lower limit given by -x).
-b Break (disconnect) the graph after each label in the input.
-c string String is the default label for each point.
-g gridstyle Gridstyle is the grid style: 0 no grid, 1 frame with ticks, 2 full grid (default).
-l label label is label for graph.
-m connectmode Mode (style) of connecting lines: 0 disconnected, 1 connected (default). Some devices give distin-
guishable line styles for other small integers.
-s Save screen, do not erase before plotting.
-x [ l ] lower [ upper [ spacing ] ] If l is present, x axis is logarithmic. lower and upper are lower (and upper) x limits. spacing,
if present, is grid spacing on x axis. Normally these quantities are determined automatically.
-y [ l ] lower [ upper [ spacing ] ] If l is present, y axis is logarithmic. lower and upper are lower (and upper) y limits. spacing,
if present, is grid spacing on y axis. Normally these quantities are determined automatically.
-h fraction fraction of space for height.
-w fraction fraction of space for width.
-r fraction fraction of space to move right before plotting.
-u fraction fraction of space to move up before plotting.
-t Transpose horizontal and vertical axes. Option -x now applies to the vertical axis.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
SEE ALSO
lpr(1B), plot(1B), spline(1), plot(3PLOT), attributes(5)
BUGS
graph stores all points internally and drops those for which there is no room.
Segments that run out of bounds are dropped, not windowed.
Logarithmic axes may not be reversed.
SunOS 5.10 14 Sep 1992 graph(1)