05-02-2007
Do you want to speed it up? Consider putting the likeliest cases on the left hand side of the if statement, if this is POSIX shell.
Otherwise, what are you trying to do?
10 More Discussions You Might Find Interesting
1. AIX
hello, we have a aix 5.2 server with 8GB of ram. is it possible, without actually removing the hardware, to have the O/S think it has only 4GB of ram? We would like to see how the handles and responds if it only had 4Gb instead of the 8GB. Any ideas or suggestions? Thanks
Looks like i found... (6 Replies)
Discussion started by: zuessh
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a server which is running out of space on the rootvg. When trying to find some spare space I discovered there are 2 sysdump logical volumes, each of 5GB, yet if I get an estimate of the dump size it's only 0.5 GB.
$ lsvg -l rootvg|grep sysdump
hd71 sysdump 20 ... (1 Reply)
Discussion started by: m223464
1 Replies
3. Shell Programming and Scripting
Hi All,
The below script I run daily and it consumes 2 hours approx.
In this I am calling another script and executing the same twice.
Is the loop below the cause for the slow process?Is it possible to finetune the program so that it runs in a much faster way?
The first script:
#!/bin/ksh... (4 Replies)
Discussion started by: Sreejith_VK
4 Replies
4. Shell Programming and Scripting
hi
i have a string "hostname=lpdma520_dev_ipc_us_aexp_com"
now i need only "newHostname=lpdma520"
how to do this one
please help soon (2 Replies)
Discussion started by: satish@123
2 Replies
5. AIX
Hi
I have used gzip on AIX and the used paging space has jumped from 7% to 20%. The gzip process is finished since a long time. But the used paging space is still the same. How to release this space ? (1 Reply)
Discussion started by: bfarah
1 Replies
6. Shell Programming and Scripting
printf "\nClosing stats:\n" >> data.txt
echo >> data.txt
sed 's/^ \t*//;/^#/d;/^$/d' $stats | while read line
do
close=$(grep -w "^$line" $datafile | sed -e 's/\(.*\),\(.*\),\(.*\)/\2/')
if ; then
printf "%5d. %-s was not found in file\n"... (3 Replies)
Discussion started by: jafa401
3 Replies
7. Shell Programming and Scripting
Hi All,
Could some one help me to reduce the code...
if
then
./plist -m "$queuename" |grep $2|awk '{print $3}' >unlock.log
elif
then
./plist -m "$queuename" |grep $2|awk '{print $4}' >unlock.log
else
./plist -m "$queuename" |grep $2|awk '{print $5}' >unlock.log
.
.
.
.
... (1 Reply)
Discussion started by: harshakusam
1 Replies
8. Shell Programming and Scripting
Hi ALL
I have a script where in i need to check for several values in if conditons but when i execute the script it throws error such as "TOO MANY ARGUMENTS"
if
then
msg="BM VAR Issue :: bmaRequestVAR=$bmaRequestVAR , nltBMVAR=$nltBMVAR , bmaResponseVAR=$bmaResponseVAR ,... (10 Replies)
Discussion started by: nikhil jain
10 Replies
9. Shell Programming and Scripting
hi all,
i have written the following script that does this work:
1. copy large logs files from one server to another.
2. then unzip this files and extraxt from these large https logs only those fields that are neccesary.
3. then archive the extracted logs to new files.
BUT the problem is... (7 Replies)
Discussion started by: arrals_vl
7 Replies
10. Shell Programming and Scripting
Hi Team,
Please help me in shell script, I have a some file in Linux which I want to reduce the space every 4 hours in the form of ZIP move to other location with the help of Shell Script using with with current date. Can you please help me.
Regards,
Suhail (3 Replies)
Discussion started by: frsuhail001
3 Replies
curs_border(3CURSES) Curses Library Functions curs_border(3CURSES)
NAME
curs_border, border, wborder, box, whline, wvline - create curses borders, horizontal and vertical lines
SYNOPSIS
cc [ flag ... ] file ... -lcurses [ library ... ]
#include <curses.h>
int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br);
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br);
int box(WINDOW *win, chtype verch, chtype horch);
int hline(chtype ch, int n);
int whline(WINDOW *win, chtype ch, int n);
int vline(chtype ch, int n);
int wvline(WINDOW *win, chtype ch, int n);
DESCRIPTION
With the border(), wborder(), and box() routines, a border is drawn around the edges of the window. The arguments and attributes are:
ls left side of the border
rs right side of the border
ts top side of the border
bs bottom side of the border
tl top left-hand corner
tr top right-hand corner
bl bottom left-hand corner
br bottom right-hand corner
If any of these arguments is zero, then the following default values (defined in <curses.h>) are used respectively instead: ACS_VLINE,
ACS_VLINE, ACS_HLINE, ACS_HLINE, ACS_ULCORNER, ACS_URCORNER, ACS_BLCORNER, ACS_BRCORNER.
box(win, verch, horch) is a shorthand for the following call:
wborder(win, verch, verch, horch, horch , 0, 0, 0, 0)
hline() and whline() draw a horizontal (left to right) line using ch starting at the current cursor position in the window. The current
cursor position is not changed. The line is at most n characters long, or as many as fit into the window.
vline() and wvline() draw a vertical (top to bottom) line using ch starting at the current cursor position in the window. The current cur-
sor position is not changed. The line is at most n characters long, or as many as fit into the window.
RETURN VALUES
All routines return the integer OK, or a non-negative integer if immedok() is set. See curs_outopts(3CURSES).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
curs_outopts(3CURSES), curses(3CURSES), attributes(5)
NOTES
The header <curses.h> automatically includes the headers <stdio.h> and <unctrl.h>.
Note that border() and box() may be macros.
SunOS 5.10 31 Dec 1996 curs_border(3CURSES)