0

I have alias which contain small script. We generally call alias with username argument. For small enhancement,we need to call from shell script. I have write into shell script but it looks like that it does not work

/usr/local/buildpkgs/latest/TclDevKit2.6/bin/tclsh 
      $VDK_PATH/scripts/ves.tcl /bin/csh $vdktmpfile !*;source  
      $vdktmpfile;/bin/rm $vdktmpfile;
      /usr/local/buildpkgs/latest/TclDevKit2.6/bin/tclsh 
      $VDK_PATH/scripts/vep.tcl $vdktmpfile $SHELL "$prompt:q"; 
      source  $vdktmpfile; /bin/rm $vdktmpfile   = sample 

we generally invoke alias from command line like sample <username>.We need to call this alias from cshell scrip similar way sample <username>. Does anyone help me to figure out this issue.

Note: I never seen such a long alias if anyone provide me detail it will be great help.

Delimitry
  • 2,987
  • 4
  • 30
  • 39
user765443
  • 1,856
  • 7
  • 31
  • 56

1 Answers1

0

Where is the alias specified? If not in .bashrc but in a general shell script, then you will have to inside of your current shell script: a) first invoke shell script containing the alias then b) call alias as you normally do i.e sample <username>

Other alternative is you might want to call your shell script like this:

. ./<script-name>.sh <args>*

as opposed to just

./<script-name>.sh <args>*

the extra period is to execute script in current shell where alias already defined and not create its own process

neid
  • 315
  • 1
  • 4
  • 12