How can I...

From: Karl Moosberg (karlm_at_privacy.org)
Date: 07/26/04


Date: Mon, 26 Jul 2004 19:48:10 +0200


...pass an option from a FIELD to a command line (shell script)?

What I'm trying to do is: I have a field TMP = "filemmdd.tar" and I want to
replace mm with the current month and dd with the current day (should be no
problem via DATE with format option).

Then I want to pass this field as option to a command in the shell script -
something like 'mycommand -safe -nogui TMP /dev/hda1' where TMP needs to be
replaced with the filename inside TMP.

Any ideas?

Karl



Relevant Pages

  • print subsystem errors
    ... I have an application that executes a shell script to print jobs. ... I can take the same command issued in the shell script; ... ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ...
    (AIX-L)
  • Re: despair
    ... I once tried to write a cd program in Unix. ... Just putting a cd command in a script and then ... hell are you supposed to write shell script macros to run a frequently ... make "$ FOO BAR" a meaningful DCL command. ...
    (comp.os.vms)
  • Re: cron and command quote
    ... if you are going to be using a shell script you have to make sure that it exits properly. ... So, '||' is just as legal as '&&' and would do just as it does on the command line, assuming of course there is nothing found by the grep. ... with && we have execute command1 if it returns true execute command2 ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Oracle dbi ?
    ... Can you execute a command line ... > shell script using OCI? ... Not using OCI, but Perl can run SQL*Plus very nicely. ...
    (perl.dbi.users)
  • Re: need help with a shell script
    ... > I've written a shell script which will create a new user, ... Doing the first option at the command line ... > these users to be able to log in to their old email accounts. ... > vaguely resemble those of Navarro College. ...
    (RedHat)