Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Passing arguments to alias with multiple commands Post 302523947 by vgersh99 on Friday 20th of May 2011 10:56:14 AM
Old 05-20-2011
worked fine with Solaris' bash:
Code:
alias foo='ls $@'
foo -l

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Passing arguments to an alias

I want to have an alias for the command fold -78 filename | lp How do I set my alias so that the argument passed is filename ?? alias lp='fold -78 | lp' then lp filename wont work cuase this is fold -78 | lp filename (1 Reply)
Discussion started by: pmcg
1 Replies

2. UNIX for Dummies Questions & Answers

Alias confusion - multiple commands ?

I've read the man on the alias command, and I am perplexed. I don't see a way to create an alias that will perform more than one command......is there a way to create an alias that is a string of a commands ? (1 Reply)
Discussion started by: HikerLT
1 Replies

3. Answers to Frequently Asked Questions

Passing variables/arguments/parameters to commands

A good place to start is simple variable passing.... Passing variables from one script to another The next level is passing a variable into a more complex command such as using a variable in a sed command. There are some simple quoting techniques that are very general. These are mentioned... (0 Replies)
Discussion started by: Perderabo
0 Replies

4. UNIX for Dummies Questions & Answers

How to make delays between multiple commands in an alias (ircII)?

Okay so I have an alias that looks like this: ALIAS gscn { MSG gscn Test1 MSG gscn Test2 MSG gscn Test3 MSG gscn Test4 MSG gscn Test5 } How do I make it wait 5 seconds between each command before it executes the next one after that in order from top to bottom? I tried the TIMER... (1 Reply)
Discussion started by: guitarscn
1 Replies

5. Shell Programming and Scripting

Help required in passing multiple arguments from a shell script to a pl/sql block

Hi, hope everyone are fine. Please find my issue below, and I request your help in the same In a configuration file, i have a variable defined as below TEST = 'One','Two','Three' I am trying to pass this variable in to a sql script which is define in a pl/sql block as follows, In the... (1 Reply)
Discussion started by: ramakanth_burra
1 Replies

6. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

7. Shell Programming and Scripting

Passing multiple run time arguments

the scenario is - If I pass 3 three arguments( run time) , it should list all .txt files from a path to temp file if I pass 2 arguments ( run time) , it should list all .csv files from the same path to another temp file the above scenario should be handled in single code and also I dont know ... (2 Replies)
Discussion started by: Prashanth B
2 Replies

8. Shell Programming and Scripting

Passing multiple arguments to a shell script

Hi Gurus, Need some help with the shell scripting here. #!/bin/ksh ps -ef | grep -i sample.ksh | grep -v grep > abc.txt if then echo "sample.ksh is executing" else echo "sample.ksh is not executing" fi (1 Reply)
Discussion started by: jayadanabalan
1 Replies

9. Shell Programming and Scripting

Passing multiple arguments

Hi, I know with getopts you can pass arguments from the command line ./script -ab -c apple But it doesn't support 2 or more arguments for ONE option. Is there any other way to do this? Thanks (2 Replies)
Discussion started by: testa500
2 Replies

10. Shell Programming and Scripting

Ssh multiple hops to execute commands with arguments

Hi I need to write a script to ssh through several hops (e.g. HostA-HostB-HostC-HostD), where Host A does not have direct assess to HostC ; HostB cannot access HostD directly. when I ssh 3 hops and run command with arg1, arg2 and redirect the output to a file, e.g. HostA> ssh -t HostB ssh -t... (3 Replies)
Discussion started by: chiensh
3 Replies
MakeMethods::Emulator::AccessorFast(3pm)		User Contributed Perl Documentation		  MakeMethods::Emulator::AccessorFast(3pm)

NAME
Class::MakeMethods::Emulator::AccessorFast - Emulate Class::Accessor::Fast SYNOPSIS
package Foo; use base qw(Class::MakeMethods::Emulator::AccessorFast); Foo->mk_accessors(qw(this that whatever)); # Meanwhile, in a nearby piece of code! # Emulator::AccessorFast provides new(). my $foo = Foo->new; my $whatever = $foo->whatever; # gets $foo->{whatever} $foo->this('likmi'); # sets $foo->{this} = 'likmi' DESCRIPTION
This module emulates the functionality of Class::Accessor::Fast, using Class::MakeMethods to generate similar methods. You may use it directly, as shown in the SYNOPSIS above, Furthermore, you may call "use Class::MakeMethods::Emulator::AccessorFast '-take_namespace';" to alias the Class::Accessor::Fast namespace to this package, and subsequent calls to the original package will be transparently handled by this emulator. To remove the emulation aliasing, call "use Class::MakeMethods::Emulator::AccessorFast '-release_namespace'". Caution: This affects all subsequent uses of Class::Accessor::Fast in your program, including those in other modules, and might cause unexpected effects. SEE ALSO
See Class::MakeMethods for general information about this distribution. See Class::MakeMethods::Emulator for more about this family of subclasses. See Class::Accessor::Fast for documentation of the original module. perl v5.10.1 2004-09-06 MakeMethods::Emulator::AccessorFast(3pm)
All times are GMT -4. The time now is 05:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy