11-07-2013
Scroll down to the bottom of the page.
10 More Discussions You Might Find Interesting
1. SCO
Hello,
I am having performance problem when , i ported a c code from Unixware 2.1 to Unixware 7.0.0.
My program establishes a synchornous connection with the client in a windows OS and then sends and receives messsages using the recv and send calls.
What i hyave noticed is that after a... (0 Replies)
Discussion started by: Amith
0 Replies
2. UNIX for Advanced & Expert Users
All
i am struggling to raplace some text in a line between two (closest) patterns ,
line="/home/usr/bin/:/home/usr/devuser,n1.9/bin:/home/usr/root/bin"
i want to replace "devuser,n1.9" with "NEWVAL", basically all teh text from "devuser" until nearest '/' with some new text.
i tried teh... (1 Reply)
Discussion started by: sudheer1984
1 Replies
3. Shell Programming and Scripting
Hi
I am having some problom deleting the lines between two specific lines in a file. need to delete lines between two closest lines. i.e need to find the closest range or pattern in a file with repeating patterns.
Sample Input:
WARNING
<some text in n number of lines>
ERROR:2597... (10 Replies)
Discussion started by: sudheer1984
10 Replies
4. Shell Programming and Scripting
out of a range of numbers, how can i pick out the number that is the closest to any arbitrary/random number that a user supplies?
say the range of numbers are between 1 - 90000. but that doesn't mean each number exist between 1 - 90000. the range of numbers could be for example:
1, 3, 4, 6,... (6 Replies)
Discussion started by: SkySmart
6 Replies
5. Solaris
Hi all. Im new to programming and Unix. Want to start learning to use Solaris 11. I have 2 boxes currently and want to run an all in one Solaris Box to act as a file server, web server ect. I want to use the second box as my main programming box that is as close to a Solaris OS as possible that has... (3 Replies)
Discussion started by: Fingerz
3 Replies
6. Shell Programming and Scripting
Hi,
Is this possible? I want to take a csv file and find the closest value in another csv file preceding it and following it.
For ex. In this csv file, I'll take the first line:
1309341156.800000000
1309341156.802500000
1309341156.805000000
1309341156.807500000
and find the closest... (2 Replies)
Discussion started by: superbbrr
2 Replies
7. Shell Programming and Scripting
Hi all
I have a great challenge that I am not able to resolve.
Briefly, I have a file like this:
ID_1 chr1 100 -
ID_2 chr2 300 +
and another file like this:
name_1 chr1 150 no -
name_2 chr1 250 yes -
name_3 chr2 350 yes +
name_4 chr2 280 yes +
Well, for each entry in file1 I would... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
8. Shell Programming and Scripting
Hi All
I am sorry but I have to open a new thread about my issue.
My input files are:
file_1
ID_1 10
ID_2 15
ID_3 32
ID_4 45
ID_5 66
ID_6 79
ID_7 88
file_2
ID_3
ID_5My output file should be
ID_3 ID_1(-22) ID_2(-17) ID_4(-13) ID_5(34) (5 Replies)
Discussion started by: giuliangiuseppe
5 Replies
9. Shell Programming and Scripting
so i have a code that identifies which value is the closest to a value provided by the user.
awk -F"," -v c=${COLUMN} -v t=${USTIME} '{a=$c}END{
asort(a);d=a-t;d=d<0?-d:d;v = a
for(i=NR-1;i>=1;i--){
m=a-t;m=m<0?-m:m
if(m<d){
... (3 Replies)
Discussion started by: SkySmart
3 Replies
10. Shell Programming and Scripting
In the example below i would want the extensions to match.
Is there any other utility or script to achieve this. Kindly help.
Example:
sdiff sourceFileNames targetFileNames
17021701P.blf | 17021901P.ibk
17021701P.chn | 17021901P.irk
17021701P.bmr | 17021901P.dyd
17021701P.dpf |... (7 Replies)
Discussion started by: jamilpasha
7 Replies
LEARN ABOUT NETBSD
menu_driver
MENU_DRIVER(3) BSD Library Functions Manual MENU_DRIVER(3)
NAME
menu_driver -- main menu handling function
LIBRARY
Curses Menu Library (libmenu, -lmenu)
SYNOPSIS
#include <menu.h>
int
menu_driver(MENU *menu, int c);
DESCRIPTION
The menu_driver() function is the guts of the menu system. It takes the commands passed by c parameter and performs the requested action on
the menu given. The following commands may be given to the menu driver:
Command Action
REQ_LEFT_ITEM Sets the new current item to be the item to the left of the current item.
REQ_RIGHT_ITEM Sets the new current item to be the item to the rights of the current item.
REQ_UP_ITEM Sets the new current item to be the item above the current item.
REQ_DOWN_ITEM Sets the new current item to be the item below the current item.
REQ_SCR_ULINE Scroll the menu one line towards the bottom of the menu window. The new current item becomes the item immediately above
the current item.
REQ_SCR_DLINE Scroll the menu one line towards the top of the menu window. The new current item becomes the item immediately below the
current item.
REQ_SCR_DPAGE Scroll the menu one page towards the bottom of the menu window.
REQ_SCR_UPAGE Scroll the menu one page towards the top of the menu window.
REQ_FIRST_ITEM Set the current item to be the first item in the menu.
REQ_LAST_ITEM Set the current item to be the last item in the menu.
REQ_NEXT_ITEM Set the new current item to be the next item in the item array after the current item.
REQ_PREV_ITEM Set the new current item to be the item before the current item in the items array.
REQ_TOGGLE_ITEM If the item is selectable then toggle the item's value.
REQ_CLEAR_PATTERN Clear all the characters currently in the menu's pattern buffer.
REQ_BACK_PATTERN Remove the last character from the pattern buffer.
REQ_NEXT_MATCH Attempt to find the next item that matches the pattern buffer.
REQ_PREV_MATCH Attempt to find the previous item that matches the pattern buffer.
If menu_driver() is passed a command that is greater than MAX_COMMAND then the command passed is assumed to be a user defined command and
menu_driver() returns E_UNKNOWN_COMMAND. Otherwise if the command is a printable character then the character represented by the command is
placed at the end of the pattern buffer and an attempt is made to match the pattern buffer against the items in the menu.
RETURN VALUES
The functions return one of the following error values:
E_OK The function was successful.
E_SYSTEM_ERROR There was a system error during the call.
E_BAD_ARGUMENT One or more of the arguments passed to the function was incorrect.
E_NOT_POSTED The menu is not posted.
E_UNKNOWN_COMMAND The menu driver does not recognize the request passed to it.
E_NO_MATCH The character search failed to find a match.
E_NOT_CONNECTED The item is not connected to a menu.
E_REQUEST_DENIED The menu driver could not process the request.
SEE ALSO
curses(3), menus(3)
NOTES
The header <menu.h> automatically includes both <curses.h> and <eti.h>.
BSD
September 10, 1999 BSD