Sponsored Content
Full Discussion: automatically open
Top Forums Shell Programming and Scripting automatically open Post 302075512 by pau on Sunday 4th of June 2006 11:28:10 AM
Old 06-04-2006
automatically open

Hi

I am trying to write a script to automatically use a predefined program to open a file according to its extension... But I don't know how to pass "programeta" ... Smilie

Code:
while [[ $1 = -* ]]; do
        case $1 in
                -pdf ) programeta="kpdf"
                       shift 1 ;;
                -ps ) programeta="ggv"
                       shift 1 ;;
                -ps.gz ) programeta="ggv"
                       shift 1 ;;
                -tex ) programeta="vim"
                       shift 1 ;;
                *  )   print -u2 "No sé de què va $1 (o no és lliure i no pense obrir-ho)"
                       exit 1 ;;
        esac
done

any hint? thanks
 

9 More Discussions You Might Find Interesting

1. Solaris

How to open and arrange terminal windows automatically under CDE?

Hi, Is there a way to open and arrange terminal windows automatically under CDE? For example, I want to open and arrange terminal windows like this: |------------| | TW TW TW | | TW TW TW | | TW TW TW | |------------| Thank you in advanced! (5 Replies)
Discussion started by: aixlover
5 Replies

2. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

3. IP Networking

My router has UPnP, as do its work with ubuntu to automatically open ports

My router has UPnP,how to make it work with ubuntu to automatically open ports I try to open the following command " /sbin/iptables -I INPUT -d 0/0 -s 0/0 -p tcp --dport 21 -j ACCEPT" ,local only opens ,if i put the ip 192.168.1.68, it works correctly, if i`m put my external ip does not work,I... (9 Replies)
Discussion started by: dhalus
9 Replies

4. Red Hat

How to open terminal automatically.

hi, I am using red hat .I want that when ever the user login in GUI interface the terminal windows automatically open and then the user want to logout it 1st close the terminal and then login. There is a file in #ls -a i.e .bashrc and .bash_logout I does not know how to add my... (0 Replies)
Discussion started by: mypass
0 Replies

5. Linux

How to open a gnome-terminal in specific workspace and run script within it automatically upon login

OK this is a bit messy. I run Fedora with gnome on a compiz desktop, I have a script (userstart) that opens my 'standard' environment for all my machines when I login. userstart flips to a specific workspace and then opens the required applications in that workspace then flips to the next... (2 Replies)
Discussion started by: Bashingaway
2 Replies

6. Shell Programming and Scripting

Open a Webpage and automatically fill entries

Hi All, Is it possible that Perl script open a webpage and when that webpage opens there is some text box in which data needs to be filled.The Perl script read the data from file and fill in that webpage. And after that click the submit button. (4 Replies)
Discussion started by: parthmittal2007
4 Replies

7. Shell Programming and Scripting

Open gnome-terminal with multi tabs and automatically run a script in each tab

Hi All , i am trying to create an alias to open a new gnome-terminal and run some commands in each tab & to have a specific name for each tab i am using csh , tried this command gnome-terminal --tab -t "s1" --tab -t "s2" --tab -t "s3" --tab -t "s4" it opened 4 tabs but the title didn't... (0 Replies)
Discussion started by: Assem
0 Replies

8. UNIX for Beginners Questions & Answers

Vim help.txt automatically open every time I open vi

Hi Friends, Every I try to open a vi window vim help.txt automatically opens evertime. After doing ZZ or :q! also the same page opens automatically. How to stop this? Is it machine specific ? Other users who are opening the same servers and files are not facing this issue. Thanks... (1 Reply)
Discussion started by: sudiptabhaskar
1 Replies

9. Shell Programming and Scripting

Vim help.txt automatically open every time I open vi

Hi Friends, Every I try to open a vi window, vim help.txt automatically opens evertime. After doing ZZ or :q! also the same page opens automatically. How to stop this? Is it machine specific ? Other users who are opening the same servers and files are not facing this issue. Thanks... (3 Replies)
Discussion started by: sudiptabhaskar
3 Replies
ggv(1)                                                             User Commands                                                            ggv(1)

NAME
ggv - GNOME PostScript and PDF previewer SYNOPSIS
ggv [gnome-std-options] filename [filename2...] DESCRIPTION
GNOME Ghostview (ggv) is the GNOME PostScript viewer program. This PostScript viewer application is based on the (non-GNOME) GNU Ghostview application. ggv is a frontend for Ghostscript, an interpreter of PostScript that is able to properly render PostScript documents in a dis- play or a printer. ggv serves as a layer that isolates the user from the cumbersome options and interface of Ghostscript, and, at the same time, provides extra features such as panning and persistent user settings. One of the main features of ggv is its antialiasing functional- ity. The ggv user interface allows you to drag PostScript files into ggv, or to move the PostScript display by dragging the mouse in the pager window or the main window. ggv can display more than one document at a time. ggv provides transparent support for compressed Post- Script and PDF files. OPTIONS
The following options are supported: gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. OPERANDS
The following operands are supported: filename The name of the file to be previewed. One or more filenames may be specified on the command-line. ggv will create a sepa- rate window for each document. The specified file should be either a PostScript or PDF file. EXAMPLES
Example 1: Previewing the PostScript file "sample.ps" example% ggv sample.ps EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/ggv Executable for GNOME PostScript and PDF previewer ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-ps-viewer | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
GNOME Ghostview Manual Latest version of the GNOME Desktop User Guide for your platform. gs(1), gnome-std-options(5) NOTES
If you are unable to load a PostScript file, check the beginning of the file (uncompressed if necessary). The file might not be a Post- Script file, or it may have been created on a system that uses a different character for line ending than that used by UNIX (for example, an Apple Macintosh). The simplest solution for the latter is to write a small PERL script that converts the file into the correct format. Written by Brian Cameron (Sun Microsystems Inc., 2003), Jaka Mocnik (jaka.mocnik@kiss.uni-lj.si), Daniel M. German (dmg@csg.uwaterloo.ca), Jan Schaumann (jschauma@netmeister.org). SunOS 5.10 2 Oct 2003 ggv(1)
All times are GMT -4. The time now is 11:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy