Creating bash script to process a data file based on the menu
Hey, im fairly new to unix and Im trying to make this unix project that would display a menu and do the following.
Trying to make this menu and have all those functions work. Im trying to incorporate a loop, case statements, pretty much have a menu that you choose the option and then continue to the sub option.
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 12-01-2017 at 12:49 PM..
Reason: Added CODE tags.
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)
I am trying to figure out a way to proceed through a menu-based program in UNIX with just one command to execute several steps. Is this possible?
From the command prompt I would normally type the name of the program, 'disk_analysis' to start the program and bring up its menu.
I would then... (4 Replies)
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
I have a main menu
quit=n
while
do
clear
echo
echo "1. General system information"
echo "2. Hardware utilisation information"
echo "3. File management"
echo "4. User information"
echo "5. Information on network connectivity"
echo "6. Information on processes"
echo "Q.Quit" ... (3 Replies)
Greetings all,
I'm having some trouble writing a menu drive bash script, actually coding the menu part was not difficult however its a problem with a menu option I'm having trouble with.
My menu has 5 options, when the user selects the second option, they are then prompted to enter a number from... (5 Replies)
I have a file that looks like this:
cat includes
CORP-CRASHTEST-BU
e:\crashplan\
CORP-TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
CORP-LABS_TEST
/usr/openv/java
/usr/openv/logs
/usr/openv/man
What I want to do is make three new files with just those selections. So the three... (4 Replies)
Hello.
I need to write a command line interface that can be invoked either directly from the shell (command sub-command arguments), or as a shell that can process sub-commands.
i want to use bash auto completion for both scenarios.
example: lets say my CLI module is called 'mycli' and there... (5 Replies)
I have a file with lines like:
111 12 7
111 13 8
112 12 9
115 31 3
120 31 9
123 10 7
125 12
I want to make a script which, split the first column into parts (101-110, 111-120...), and make directories for its part with name (101-110, 111-120...) Also i want in every directory include... (7 Replies)
We have the data looks like below in a log file.
I want to generat files based on the string between two hash(#) symbol like below
Source:
#ext1#test1.tale2 drop
#ext1#test11.tale21 drop
#ext1#test123.tale21 drop
#ext2#test1.tale21 drop
#ext2#test12.tale21 drop
#ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
LEARN ABOUT DEBIAN
xpamethod
xpamethod(7) SAORD Documentation xpamethod(7)NAME
XPAMethod - XPA Communication Methods
SYNOPSIS
XPA supports both inet and unix (local) socket communication.
DESCRIPTION
XPA uses sockets for communication between processes. It supports three methods of socket communication: inet, localhost, and unix. In gen-
eral, the same method should be employed for all XPA processes in a session and the global environment variable XPA_METHOD should be used
to set up the desired method. By default, the preferred method is "inet", which is appropriate for most users. You can set up a different
method by typing something like:
setenv XPA_METHOD local # unix csh
XPA_METHOD=local; export XPA_METHOD # unix sh, bash, windows/cygwin
set XPA_METHOD=localhost # dos/windows
The options for XPA_METHOD are: inet, unix (or local), and localhost. On Unix machines, this environment setup command can be placed in
your shell init file (.cshrc, .profile, .bashrc, etc.) On Windows platforms, it can be placed in your AUTOEXEC.BAT file (I think!).
By default, inet sockets are used by XPA. These are the standard Internet sockets that are used by programs such as Netscape, ftp. etc.
Inet sockets utilize the IP address of the given machine and a (usually random) port number to communicate between processes on the same
machine or between different machines on the Internet. (Note that XPA has an Access Control mechanism to prevent unauthorized access of XPA
access points by other computers on the Net). For users connected to the Internet, this usually is the appropriate communication method.
For more information about setting up XPA communication between machines, see Communication Between Machines.
In you are using XPA on a machine without an Internet connection, then inet sockets are not appropriate. In fact, an XPA process often will
hang for many seconds while waiting for a response from the Domain Name Service (DNS) when using inet sockets. Instead of inet sockets,
users on Unix platforms can also use unix sockets (also known as local sockets). These sockets are based on the local file system and do
not make use of the DNS. They generally are considered to be faster than inet sockets, but they are not implemented under Windows. Use
local sockets as a first resort if you are on a Unix machine that is not connected to the Internet.
Users not connected to the Internet also can use localhost sockets. These are also inet-type sockets but the IP address used for the local
machine is the localhost address, 0x7F000001, instead of the real IP of the machine. Depending on how sockets are set up for a given plat-
form, communication with the DNS usually is not required in this case (though of course, XPA cannot interact with other machines). The
localhost method will generally work on both Unix and Windows platforms, but whether the DNS is required or not is subject to individual
configurations.
A final warning/reminder: if your XPA-enabled server hangs at startup time and your XPA_METHOD is inet, the problem probably is related to
an incorrect Internet configuration. This can be confirmed by using the unix method or (usually) the localhost method. You can use these
alternate methods if other hosts do not need access to the XPA server.
SEE ALSO
See xpa(7) for a list of XPA help pages
version 2.1.14 June 7, 2012 xpamethod(7)