Sponsored Content
Full Discussion: Driver Install Script
Top Forums UNIX for Dummies Questions & Answers Driver Install Script Post 302588225 by dmacmillan on Saturday 7th of January 2012 05:23:09 PM
Old 01-07-2012
Driver Install Script

Hi, I am faily new to linux and bash scripting. But essentially what I am trying to do is create a small bash script that will automatically install a driver I want. I can do it manually but I want to create a script so I won't forget, since it is an internet driver I won't be able to get help when trying to install it on my computer unless I have another one nearby.

Anyways, what I want to do is first extract the driver from its zip archive. So I want the bash script to read the full path to the archive and unzip it. I so far have a prompt that says to drag the driver onto the terminal screen, and in doing so this stores the filepath (enclosed by single quotations) in the variable "ans".

So how do I parse the variable so that the single quotations are excluded when I run an unzip command on the variable?

---------- Post updated at 05:23 PM ---------- Previous update was at 05:20 PM ----------

Oh and here is my code...
Code:
clear
echo 'Drag the driver archive onto the Terminal screen and press enter'
echo 'e.g. "/home/MYUSERNAME/2010_01_28_RT2860_Linux_STA_v2.3.0.0_Alpha_v2.zip"'
read ans
#remove enclosing (') from ans
unzip -o $ans

 

10 More Discussions You Might Find Interesting

1. SCO

Need to create megasas driver floppy for new install

I have a new Dell PowerEdge 2900 with perc5/i and no os. I need to install SCO Openserver 6 and I need create a megasas BTLD floppy in order to install the os. http://ftp.sco.com/pub/unixware7/714/drivers/megasas_1.1/README.hba.megasas.1.1.txt According to the link, I need to download the... (4 Replies)
Discussion started by: jpop2000
4 Replies

2. Solaris

Tape Driver Install

Hi , How to check the drivers of a dat tape? And once downloaded how to install drivers for the same?? Where to download drivers from? Having some trouble with Dat tape drive configuration.. (2 Replies)
Discussion started by: saurabh84g
2 Replies

3. Solaris

Can I Install the Gani Network Driver Using the Application that Came on the CD?

When I boot up the Solaris 10 5/09 install CD and select 'Solaris' from the GRUB menu that comes up, a menu loads. Option 5 is 'Apply Driver Updates'. Can I install the Gani driver using that? I tried using the tar file (the way it came) that I wrote to a floppy but when I asked it to look at the... (8 Replies)
Discussion started by: Bradj47
8 Replies

4. Solaris

After update Solaris version, HBA driver still need to install?

Hi all I had update a server from Solaris 8 to Solaris 10 is it the HBA driver still need to reinstall? since i can get the driver info as below: root@sgerpdev # fcinfo hba-port HBA Port WWN: 21000003ba9b58a3 OS Device Name: /dev/cfg/c1 Manufacturer: QLogic Corp. ... (1 Reply)
Discussion started by: SmartAntz
1 Replies

5. SCO

install NIC driver for Intel Pro 1000

hi I have a fresh installation of SCO 5.0.6 and I have download a NIC driver for Intel Pro 1000: ftp://ftp.sco.com/pub/openserver5/507/drivers/eeG_5.0.7g/VOL.000.000 Howto install it using floppy? ---------- Post updated at 04:02 PM ---------- Previous update was at 02:18 PM... (0 Replies)
Discussion started by: ccc
0 Replies

6. Hardware

How to install a driver of my USB-A to Serial Cable

Hi Gurus of Unix Recently I install a OpenSolaris in My HP 530 In this moment want to install a USB-A to Serial Cable. Any guru can send a Link where I can use how reference. I want to configure a Router and my PC don't have any serial Port. My LapTOP only has USB ports. In this case I buy a... (2 Replies)
Discussion started by: andresguillen
2 Replies

7. Fedora

How i can install Driver ATI on OpenBSD 4.8 & HARD

hi guys i am using fedora 14 but today moving to OpenBSD4.8 and remove all part hard :mad: but easy install programs pkg_add program :b: now How i can install Driver ATI on OpenBSD 4.8 ? and i am use "lspci" show hardware but not work openbsd & how i can create part my home size... (0 Replies)
Discussion started by: OpenBSD1986
0 Replies

8. Ubuntu

Is Ubuntu OS good? Do you need to install any driver after installing it?

I'm planning to install the Ubuntu OS on my laptop(currently has windows Vista), but I don't know if Ubuntu is good. Do you need to install any drivers for Ubuntu? Can I send stuff to my printer in Ubuntu? Is it compatible with my printer driver? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

9. UNIX for Advanced & Expert Users

Help with adding a new driver in initrd at install time

I have a really old distro (FC7) that I am trying to make compatible with some new hardware (ie. new RAID drivers)... I put the RAID driver into the ISO so that the installer can detect the RAID set... but post-install (aka: first boot) it appears that the Anaconda-generated initrd does not have... (0 Replies)
Discussion started by: jjinno
0 Replies

10. Debian

Debian Etch - install us-keyboard driver

Hi, i'm using a debian-4.0r1 on an old subnet machine. I have to extend it with an other keyboard . What i have is a DVD of etch 4.0r7. How can i install and load the keyboard-driver for the us-keyboard? Can anybody please give me a hint how to do that? Thanks in advance (0 Replies)
Discussion started by: IMPe
0 Replies
FUNZIP(1)						      General Commands Manual							 FUNZIP(1)

NAME
funzip - filter for extracting from a ZIP archive in a pipe SYNOPSIS
funzip [-password] [input[.zip|.gz]] ARGUMENTS
[-password] Optional password to be used if ZIP archive is encrypted. Decryption may not be supported at some sites. See DESCRIPTION for more details. [input[.zip|.gz]] Optional input archive file specification. See DESCRIPTION for details. DESCRIPTION
funzip without a file argument acts as a filter; that is, it assumes that a ZIP archive (or a gzip'd(1) file) is being piped into standard input, and it extracts the first member from the archive to stdout. When stdin comes from a tty device, funzip assumes that this cannot be a stream of (binary) compressed data and shows a short help text, instead. If there is a file argument, then input is read from the speci- fied file instead of from stdin. A password for encrypted zip files can be specified on the command line (preceding the file name, if any) by prefixing the password with a dash. Note that this constitutes a security risk on many systems; currently running processes are often visible via simple commands (e.g., ps(1) under Unix), and command-line histories can be read. If the first entry of the zip file is encrypted and no password is specified on the command line, then the user is prompted for a password and the password is not echoed on the console. Given the limitation on single-member extraction, funzip is most useful in conjunction with a secondary archiver program such as tar(1). The following section includes an example illustrating this usage in the case of disk backups to tape. EXAMPLES
To use funzip to extract the first member file of the archive test.zip and to pipe it into more(1): funzip test.zip | more To use funzip to test the first member file of test.zip (any errors will be reported on standard error): funzip test.zip > /dev/null To use zip and funzip in place of compress(1) and zcat(1) (or gzip(1) and gzcat(1)) for tape backups: tar cf - . | zip -7 | dd of=/dev/nrst0 obs=8k dd if=/dev/nrst0 ibs=8k | funzip | tar xf - (where, for example, nrst0 is a SCSI tape drive). BUGS
When piping an encrypted file into more and allowing funzip to prompt for password, the terminal may sometimes be reset to a non-echo mode. This is apparently due to a race condition between the two programs; funzip changes the terminal mode to non-echo before more reads its state, and more then ``restores'' the terminal to this mode before exiting. To recover, run funzip on the same file but redirect to /dev/null rather than piping into more; after prompting again for the password, funzip will reset the terminal properly. There is presently no way to extract any member but the first from a ZIP archive. This would be useful in the case where a ZIP archive is included within another archive. In the case where the first member is a directory, funzip simply creates the directory and exits. The functionality of funzip should be incorporated into unzip itself (future release). SEE ALSO
gzip(1), unzip(1), unzipsfx(1), zip(1), zipcloak(1), zipinfo(1), zipnote(1), zipsplit(1) URL
The Info-ZIP home page is currently at http://www.info-zip.org/pub/infozip/ or ftp://ftp.info-zip.org/pub/infozip/ . AUTHOR
Mark Adler (Info-ZIP) Info-ZIP 20 April 2009 (v3.95) FUNZIP(1)
All times are GMT -4. The time now is 10:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy