Hi guys, i would like to create a program that allow user to show the information of certain thing such as network card.
I would like the menu to be dynamic, for example:
my computer system have 2 network card inserted at the moment, therefore the menu will have 2 choice for the user.
eth0
lo
However, if there's changes made, for example another network card was added which name lo1. The program will update the changes and allow user to have the latest choice.
eth0
lo
lo1
I am up to here at the moment. guide me guys..
Code:
#!/bin/bash
clear
ifconfig -a | sed -n 's/^\([^ ]\+\).*/\1/p' > somefile
array=($(<somefile))
whiptail --title Networking --menu "select your choice" 16 78 5 "${array[@]}"
Regards,
Malfolozy
Last edited by malfolozy; 07-18-2014 at 07:47 PM..
Reason: code tags please
Hi all
is menu driven by SELECT can be a dynamic ?
My requirement is that i want SELECT to be created on run time not predefine . The select should be created as per the no of
words in a file
thanks in advance
rawat (2 Replies)
I'm working on a menu to read folders in as menu selections then CD to the selected folder and display the contained files as menu selections for execution.
I'm using the following to read in the file list but I get lost after that.
I only read in files that begin with CAPs. The problem is... (3 Replies)
Hi there all
I got the following
I got multiple arrays named for example
STAT_AAAA
STAT_AAAB
STAT_AAAC
STAT_AAAD
Now what I want I have chosen an option in a menu to select 1
but I dont want to write for all the same thing so I made it a signle one
now what I want is to get
STAT_ and... (6 Replies)
When I logon to my server with PuTTY I am forced into a selection menu with few options. How to I opt out of this menu to get to the home directory to view all of the files on the server?
Thanks for the help. :o (1 Reply)
hey all, me again....having a problem with my code, where I essentially am trying to show a menu, have the user select an option (from 1 to 5), then display which selection they picked...
#!/bin/bash
# A LIST OF THE ERROR MESSAGES AND THE PROPER SYNTAX:
error_0="Correct amount of... (1 Reply)
Hi,
I am using a select in ksh for a script
#!/bin/ksh
FIRSTLIST='one two three four quit'
PS3='Please select a number: '
select i in $FIRSTLIST ;
do
case $i in
one) print 'this is one' ;;
two) print 'this is 2' ;;
three) print 'this is 3' ;;
four) print... (7 Replies)
I need to create a dynamic drop down menu which is populated by entries such as;
htdocs/client1/index.php
htdocs/client2/index.php
htdocs/client3/index.php
htdocs/client4/index.php
etc.
So htdocs/client*/index.php
Is this possible?
I know how to do this using normal arrays, but not... (2 Replies)
I'm writing a shell script and have a problem with selection when I issue the command, is there a way to automatically choose a selection number one after a selection menue appear
Command
1-choice
2- choice
3-choice
Thanks
Sara (3 Replies)
Hi Guys,
Please pardon me if this is a silly question, but I have tried to find an answer and going through the man page and failed to get one. I have created a menu driven script with dialog --menu option. Everything is working as expeted, however, it seems that if I have more than 10... (1 Reply)
Discussion started by: ww889
1 Replies
LEARN ABOUT DEBIAN
opensc-tool
OPENSC-TOOL(1) OpenSC tools OPENSC-TOOL(1)NAME
opensc-tool - generic smart card utility
SYNOPSIS
opensc-tool [OPTIONS]
DESCRIPTION
The opensc-tool utility can be used from the command line to perform miscellaneous smart card operations such as getting the card ATR or
sending arbitrary APDU commands to a card.
OPTIONS --info, -i
Print information about OpenSC, such as version and enabled components
--atr, -a
Print the Answer To Reset (ATR) of the card, output is in hex byte format
--name, -n
Print the name of the inserted card (driver)
--serial
Print the card serial number (normally the ICCSN), output is in hex byte format
--send-apdu apdu, -s apdu
Sends an arbitrary APDU to the card in the format AA:BB:CC:DD:EE:FF...
--list-files, -f
Recursively lists all files stored on card
--list-readers, -l
Lists all configured readers
--list-drivers, -D
Lists all installed card drivers
--reader num, -r num
Use the given reader number. The default is 0, the first reader in the system.
--card-driver driver, -c driver
Use the given card driver. The default is auto-detected.
--wait, -w
Wait for a card to be inserted
--verbose, -v
Causes opensc-tool to be more verbose. Specify this flag several times to enable debug output in the opensc library.
SEE ALSO opensc-explorer(1)opensc 06/03/2012 OPENSC-TOOL(1)