10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script I'm working on. I needed to figure out a way to display the following information for our Linux servers: What application runs on the server (app), who owns the application (owner) and the hostname.
This is done by looking at a text file "test_owner_list" that has info like... (2 Replies)
Discussion started by: lombardi4851
2 Replies
2. Solaris
When I execute this command:
exec xterm –e $SHELL –c “sed –n 4p /folder1/folder2/folder3/file.dat; $SHELL”
I have the expecting result: It opens an new terminal, it shows the 4th line of the file and the terminal window stays open perfect.
So I tried to write it in the dtwmrc file to have an... (1 Reply)
Discussion started by: damientdm
1 Replies
3. UNIX for Dummies Questions & Answers
Good afternoon everyone,
I am very new to UNIX shell scripting and I am trying to understand the following code. I know what it does but I need to modify it so it will allow me to pass a file name as *FILENAME*
Thank for any guidance offered.
if ] ; then
match=`expr "$file" :... (2 Replies)
Discussion started by: Walter Barona
2 Replies
4. Homework & Coursework Questions
i am trying to write a script code in unix that will:
1. The problem statement, all variables and given/known data:
display following menu to user:
(A) Add
(B) Subtract
(C) Multiply
(D) Divide
(E) Modulus
(F) Exponentiation
(G) Exit
Then ask user for choice (A-F). After taking... (5 Replies)
Discussion started by: renegade755
5 Replies
5. Shell Programming and Scripting
Unix script coding help?
i am trying to write a code that will display following menu to user:
(A) Add
(B) Subtract
(C) Multiply
(D) Divide
(E) Modulus
(F) Exponentiation
(G) Exit
Then ask user for choice (A-F). After taking users choice ask user for two numbers and
perform... (3 Replies)
Discussion started by: renegade755
3 Replies
6. Shell Programming and Scripting
I have a file f1.txt that contains string:
f1.txt
aaa
bbb
ccc
...
I want to write code to search that each string in file f2.txt(this file contains 1000+line codes).
file f2.txt
..
..
....aaa...xyz..
...
...
...ppp...
(dots . can be characters ot blank spaces)
If particular... (2 Replies)
Discussion started by: Sanchit
2 Replies
7. Shell Programming and Scripting
Hello,
I have a file with various records in it (from length 30 - 195) and I want to run a script to read each line and copy only the recl=80 files to an output file.
Any help much appreciated (4 Replies)
Discussion started by: Grueben
4 Replies
8. UNIX for Dummies Questions & Answers
I'm very new to Unix and know the simplest of its commands. I am trying to write a script file that has a menu with the following options showing:
1) Display all files in a user's home directory.
2) Welcome yourself to the program
3) Display System Information
4) Exit to Windows
I am able... (6 Replies)
Discussion started by: sinjin
6 Replies
9. Shell Programming and Scripting
Greetings all,
I'm currently writing a shell script menu which is dynamically populated from an array. Have a question to ask about the filtering of invalid input. I'm using KSH.
A brief description of my algorithm is as follows:
1) Read in input from user and store in a variable. (a valid... (2 Replies)
Discussion started by: rockysfr
2 Replies
10. Shell Programming and Scripting
currently it has the following:
bdumpN=`ll /home/apps/oracle/admin/DBprod/bdump/DBprod_j* | grep "$Cdate" | wc -l`
If I pass the DBname, I would not have to hardcode it in the script...
I can capture the database name by adding the following:
DBname=$1
The problem is, I have been unable... (2 Replies)
Discussion started by: mr_manny
2 Replies
menu_userptr(3CURSES) Curses Library Functions menu_userptr(3CURSES)
NAME
menu_userptr, set_menu_userptr - associate application data with menus
SYNOPSIS
cc [ flag... ] file... -lmenu -lcurses [ library... ]
#include <menu.h>
char *menu_userptr(MENU *menu);
int set_menu_userptr(MENU *menu, char *userptr);
DESCRIPTION
Every menu has an associated user pointer that can be used to store relevant information. set_menu_userptr() sets the user pointer of menu.
menu_userptr() returns the user pointer of menu.
RETURN VALUES
menu_userptr() returns NULL on error.
set_menu_userptr() returns one of the following:
E_OK The routine returned successfully.
E_SYSTEM_ERROR System error.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO
curses(3CURSES), menus(3CURSES), attributes(5)
NOTES
The header <menu.h> automatically includes the headers <eti.h> and <curses.h>.
SunOS 5.10 31 Dec 1996 menu_userptr(3CURSES)