I searched but didn't find the answer to my question in previous posts, so i am going to throw it out to all the pros..
I have written a script for solaris zone creation, and part of this script has you select the lun that you wish to build the zone on. It is currently really messy in this part, and needs to be constantly modified as the number of luns grows.
What i am looking for is a way to have this be dynamic (ie if $DISK25 exists then have that be a valid selection in the menu). I know that a case statement is probably not the best way to do this, and maybe a select would work? The script works in its current incarnation, but i am looking for a way to avoid having to continuously add lines to the case statement as we add more and more luns, as well as get the number of lines in the code down..
and this is the part of the code where i get the $DISK# varaible for the case statement above
hopefully my question makes sense, but if there are any questions I will promptly answer them
I am by no means a pro at coding, so any help would be greatly appreciated!
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
I saw some recent posts where I thought the terms "field" and "column" were being misused. I work with data a lot, and have my opinions. I'm wondering if those opinions are correct.
***** Rows seem clear - I don't think there is any controversy about what a row is, either for database or text... (10 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I am new to shell script. This is my first post .I have written a small script which returns list of names starts with "ram" in /etc/passwd .Here is that:-
#!/bin/ksh
NAME_LIST="name_list.txt"
cat /dev/null > $NAME_LIST
evalcmd="cat /etc/passwd | grep "^ram?*" | cut -d: -f1"
eval... (3 Replies)
hello,
i thought this should work to specify that i want to "cp" all files no matter what the case, ie upper or lower, as i have 2 files called Makefile and mak
cp -i mak*
but apparently the -i isn't a valid option like it is with grep
thanks for any suggestions!
bobk (1 Reply)