Dialog script for copying a file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Dialog script for copying a file
# 1  
Old 06-13-2016
Dialog script for copying a file

Hello,

I'm trying to write a script in Dialog for configuring a router. I basically need the user to select from a list of say 4 options, confirm the option and then copy the configuration files, depending on the choice to the HDD and then reboot (I'm hoping to boot from a USB stick).

The files are for configuring eth0 ttyS0-4 and the inittab file on the HDD, but it defaults to root login so hopefully it shouldn't be problem to copy them.

PM77
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help... creating a script using Dialog

Hi , I just start to use Linux and i love it! I'm creating a project for school and is to create a script who ask the user to select and instal services like apache, dhcp, Samba, FTP etc... I create a menu using Dialog, just to make it better looking. I want to know how to retrieve the... (2 Replies)
Discussion started by: ajmaq
2 Replies

2. Shell Programming and Scripting

Copying a string from a file using shell script

Hello everyone I am completely new to shell scripting in linux. I wan to write a script to search for a certain string from a .txt file and copy the string which apears just after tat searched string. Eg: in a file- try.txt , we have a line saying: "roses are red, so what do i do" I... (4 Replies)
Discussion started by: Kishore920
4 Replies

3. Shell Programming and Scripting

Bash Script Issues (If statement for file copying)

Writing a bash script for use with Geektool, pulls the battery info, and shuffles images around so that an Image geeklet can display the correct expression as the desktop background. (Eventually I intend to make it more intricate, based on more variables, and add more expressions) I'm extremely... (1 Reply)
Discussion started by: The_Ardly374
1 Replies

4. Shell Programming and Scripting

Script to display a dialog box every 5 seconds

I want to create a script that displays a dialog box every interval of time and exits that loop when a user presses ENTER Any idies? (4 Replies)
Discussion started by: amitlib
4 Replies

5. Debian

Dialog box in debconf file.

Hi all, I am working with debconf file for packaging the projects. I have used the ". /usr/share/debconf/confmodule" file to do the packaging in debian standard. It worked fine. When ever I am installing the package in apt-get the dialogs are come as I mentioned in the templates file.... (0 Replies)
Discussion started by: Nila
0 Replies

6. Shell Programming and Scripting

Noob's 1st...bash-script for copying one file into many

I have one file "file.a.b.c-d.r" that I would like to use to spawn 4 other files: "file.a.b.1-A.r" "file.a.b.1-B.r" "file.a.b.1-C.r" "file.a.b.1-D.r" where the field "c-d" changes into my 1 and A-D. I was doing this manually at the prompt with > cp "file.a.b.c-d.r" "file.a.b.1-A.r" >... (13 Replies)
Discussion started by: WSUToad
13 Replies

7. Shell Programming and Scripting

dialog menu script. please HELP

hello. i want to create a useradd dialog menu. i cannot make a single menu with 4 box inputs ( user, pass, fullname, shell ) because the dialog utility is either limited or either i know to less about using the dialog utility. from what i see it only allows me to post these 4 boxes one by one,... (3 Replies)
Discussion started by: claudlu
3 Replies

8. Shell Programming and Scripting

Unix / Linux Dialog Utility - how to open 2+ more dialog windows ?

Hi, example of Unix / Linux dialog utility is below. I am going to use dialog as simple GUI for testing of a modem. So I need to combine some dialog boxes into one. I need to have input box, output box, info box, dialog box, radiobox as in any standard program with graphical user... (2 Replies)
Discussion started by: jack2
2 Replies

9. UNIX for Dummies Questions & Answers

script copying the directory (or file) from server to my pc

Hello, I'm trying to create the shell script that: copy (or transfer) the directory from the unix server to my external hard drive (or hard drive) I've been serching this kind of thread here, but no luck so far. anyone can help me? Thank you. (2 Replies)
Discussion started by: myjwjw
2 Replies

10. UNIX for Dummies Questions & Answers

Having problems copying a file from a script

Hello. Complete newbie over here, and I'm hoping you can help me out with this problem. The script copies a file to a directory within my home dir. Permissions are ok and the source file exists. If I execute the cp command from the command line or hardcode the path/file name, it works. ... (6 Replies)
Discussion started by: verdugan
6 Replies
Login or Register to Ask a Question
UI::Dialog::Backend::Nautilus(3pm)			User Contributed Perl Documentation			UI::Dialog::Backend::Nautilus(3pm)

NAME
UI::Dialog::Backend::Nautilus SYNOPSIS
use UI::Dialog::Backend::Nautilus; my $nautilus = new UI::Dialog::Backend::Nautilus (); my @paths = $nautilus->paths(); ABSTRACT
UI::Dialog::Backend::Nautilus is simply an OOPerl wrapper around the data provided by the nautilus(1) file manager's scripts feature. DESCRIPTION
nautilus(1) is a GNOME file manager that has a "right-click" menu for user made scripts (found in the user's ~/.gnome2/nautilus-scripts/ directory). This is an OOPerl interface to the environment variables provided to the scripts during runtime by nautilus. When you use any of the UI::Dialog meta classes (UI::Dialog, UI::Dialog::GNOME, etc.) access to this backend is provided via the $d->nautilus method. ie: replace $nautilus with $d->nautilus in the synopsis example (provided you made $d with something like my $d = new UI::Dialog...). Also, UI::Dialog and friends only load this module when you first use the $d->nautilus method (this may silently fail, but you can test by ref() for success). EXPORT
None INHERITS
None CONSTRUCTOR
new( @options ) EXAMPLE my $nautilus = new UI::Dialog::Backend::Nautilus (); DESCRIPTION This is the Class Constructor method. It accepts a list of key => value pairs and uses them as the defaults when interacting with the various widgets. RETURNS A blessed object reference of the UI::Dialog::Backend::Nautilus class. METHODS
path( ) EXAMPLE my $path = $nautilus->path(); DESCRIPTION This method examines the NAUTILUS_SCRIPT_CURRENT_URI string uri unescapes and strips it of any prefixing protocol indicators (file://) then returns the modified string. RETURNS a SCALAR. paths( ) EXAMPLE my @paths = $nautilus->paths(); DESCRIPTION This method splits the NAUTILUS_SCRIPT_SELECTED_FILE_PATHS multiline string and returns the ARRAY of selections in the order pro- vided by nautilus. RETURNS an ARRAY. uri( ) EXAMPLE my $uri = $nautilus->uri(); DESCRIPTION This simply returns the NAUTILUS_SCRIPT_CURRENT_URI string. RETURNS a SCALAR. uris( ) EXAMPLE my @uris = $nautilus->uris(); DESCRIPTION This method splits the NAUTILUS_SCRIPT_SELECTED_URIS multiline string and returns the ARRAY of selections in the order provided by nautilus. This does not uri escape or unescape the string. RETURNS an ARRAY. geometry( ) EXAMPLE my ($h,$w,$x,$y) = $nautilus->geometry(); DESCRIPTION This method splits the NAUTILUS_SCRIPT_WINDOW_GEOMETRY string and returns and ARRAY of the geometry details provided by nautilus. The array returned contains the following (in order): height width X-coordinate Y-coordinate RETURNS an ARRAY. uri_unescape( ) EXAMPLE my $path = $nautilus->uri_unescape( "file:///path/to/somewhere" ); my @paths = $nautilus->uri_unescape( "file:///path/to/somewhere", "file:///yet/another/path" ); DESCRIPTION This is the method used to unescape the NAUTILUS_SCRIPT_CURRENT_URI in the path() method. This method is derived from the URI::Escape module which is not included in the Perl core modules yet is vitally necessary for the path() method to function in a usefull manor. RETURNS an ARRAY or a SCALAR depending on the calling arguments. SEE ALSO
PERLDOC UI::Dialog UI::Dialog::Backend MAN FILES nautilus(1) BUGS
Please email the author with any bug reports. Include the name of the module in the subject line. AUTHOR
Kevin C. Krinke, E<lt>kckrinke@opendoorsoftware.comE<gt> COPYRIGHT AND LICENSE
Copyright (C) 2003 Kevin C. Krinke <kckrinke@opendoorsoftware.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA perl v5.8.8 2004-08-01 UI::Dialog::Backend::Nautilus(3pm)