Trying to alias rm to move files to a hidden trash directory in the bash shell. I've tried to create this alias numberous ways and it's just not working. Here's what I've tried, anyone have any suggestions.
alias rm='mv $* ~/.trash'
alias rm= 'mv$* ~/.trash'
things like that... I've also... (2 Replies)
Hi folks,
I have the following function ,which generates menu for installation type:
select_install_type()
{
echo
echo ========================================
echo Please select the type of installation:
echo ========================================
... (8 Replies)
I am very new to Unix and know the basic commands. I have to write a script file and I'm completely lost. The script file is to show the following at the beginning:
Menu of Options
1. Display all files in a user's home directory.
2. Welcome yourself to the program.
3. Display System... (8 Replies)
Hi,
I need your help co create a very small menu somthing that look like this:
1. first step
2. second step
3. last step
from step : ___
to step : ___
If the user choose 1 --> it will echo : Hellow
If the user choose 2 --> it will echo : World
If the user choose 3 --> it will echo... (4 Replies)
Hi,
I need to go through all the files on my system and build a list/output file with the paths of all files where the first two characters within the file match an expression.
I know I can use something like
find . | xargs cut -b1-2
or
find . -exec cut -b1-2 {} \;
to get the characters... (3 Replies)
Problem:
I am trying to create a menu in a menu script and I am running into an issue with the calculator portion of the script. I am first presented with the ==Options Menu== which all 5 options working correctly. Now comes the fun part. I select option 1 which takes me to my ==Calculator... (1 Reply)
hi all i am a newbie to this
is there any examples on creating a main menu with 3 sub menu
main menu -> option a , b and c
a menu -> option 1 ,2 and 3
b menu -> option 1 ,2
c menu -> option 1 ,2
i am getting headache as my code kept getting unexpected EOF
---------- Post... (0 Replies)
Hi Master of masters,
Thanks for ur reply.
Need ur help for following. Is it possible to create menu for following in linux or a function.
> Look in logs > Status > Action > End Action
> CONFSUCCESS > Success > Show message as successful > Enter to continue
> CONFFAIL > Failure > Show... (1 Reply)
Hey, im fairly new to unix and Im trying to make this unix project that would display a menu and do the following.
MENU
===========================
(p, P) Print users info
(a, A) Add new user
(s, S) Search user
(d, D) Delete user
(x,X) Exit
Enter your choice:
Trying to... (3 Replies)
I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome.
Unfortunately, I never found a... (1 Reply)
Discussion started by: bodisha
1 Replies
LEARN ABOUT NETBSD
set_fieldtype_choice
FORMS(3) BSD Library Functions Manual FORMS(3)NAME
free_fieldtype, link_fieldtype, new_fieldtype, set_fieldtype_arg, set_fieldtype_choice -- form library
LIBRARY
Curses Form Library (libform, -lform)
SYNOPSIS
#include <form.h>
int
free_fieldtype(FIELDTYPE *fieldtype);
FIELDTYPE *
link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2);
FIELDTYPE *
new_fieldtype(int (*field_check)(FIELD *, char *), int (*char_check)(int, char *));
int
set_fieldtype_arg(FIELDTYPE *fieldtype, char * (*make_args)(va_list *), char * (*copy_args)(char *), void (*free_args)(char *));
int
set_fieldtype_choice(FIELDTYPE *fieldtype, int (*next_choice)(FIELD *, char *), int (*prev_choice)(FIELD *, char *));
DESCRIPTION
The function free_fieldtype() frees the storage associated with the field type and destroys it. The function link_fieldtype() links together
the two given field types to produce a new field type. A new field type can be created by calling new_fieldtype() which requires pointers to
two functions which perform validation, the field_check function must validate the field contents and return TRUE if they are acceptable and
FALSE if they are not. The char_check validates the character input into the field, this function will be called for each character entered,
if the character can be entered into the field then char_check must return TRUE. Neither field_check nor char_check may be NULL. The func-
tions for handling the field type arguments can be defined by using the set_fieldtype_arg() function, the make_args function is used to cre-
ate new arguments for the fieldtype, the copy_args is used to copy the fieldtype arguments to a new arguments structure and free_args is used
to destroy the fieldtype arguments and release any associated storage, none of these function pointers may be NULL. The field type choice
functions can be set by calling set_fieldtype_choice(), the next_choice and prev_choice specify the next and previous choice functions for
the field type. These functions must perform the necessary actions to select the next or previous choice for the field, updating the field
buffer if necessary. The choice functions must return TRUE if the function succeeded and FALSE otherwise.
RETURN VALUES
Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following
error values:
E_OK The function was successful.
E_BAD_ARGUMENT The function was passed a bad argument.
E_CONNECTED The field is connected to a form.
SEE ALSO curses(3), forms(3)NOTES
The header <form.h> automatically includes both <curses.h> and <eti.h>.
BSD January 1, 2001 BSD