Sponsored Content
Top Forums Shell Programming and Scripting simple shell - how to get a parameter typed in a shell script Post 11406 by brianb on Tuesday 4th of December 2001 08:18:13 PM
Old 12-04-2001
Question regular expressions and command-line arguments

As a follow-up question (that seems related):

I'm running .kshrc and want to script or alias the following:
ls -alF <i>regex</i> | more

I have not found how to pass an argument inside an alias
(e.g. alias dir='ls -alF $1 | more' does NOT work).

The following script 'dir' works:
#!/bin/ksh
ls -alF $1 | more

however, if I pass it an expression like '*.eva' it will only ls the first filename with the .eva extension (not ls all of the files with the .eva extension).

_Anyone_ who's read this far already has my sincere appreciation! If you can point me to man pages to help me solve this problem I'd appreciate it even more!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parameter file for a shell script

Hi I was able to pass parameters to a shell script from the command line but now, I am trying to make the shell script to get those parameters/values from a file. Please give me ideas how to do this or if you have an example or website that shows how to do this. I tried searches but it... (2 Replies)
Discussion started by: bryan
2 Replies

2. UNIX for Dummies Questions & Answers

Shell script with input parameter

Can anyone help me how to write a shell script which accepts input parameter. My requirement is as follows: I need to run a shell script with a input parameter, and inside the script i will create a file with this input parameter name. Please help me out to create such a shell script. ... (1 Reply)
Discussion started by: jhmr7
1 Replies

3. Shell Programming and Scripting

How to pass a parameter from one Shell-script to another Shell-script

Dear Friends, Please help me. How can I pass a parameter from one Shell-script to another Shell-script. Example: FirstScript.sh ------------- ./SecondScript.sh 'paramater' And SecondScript.sh --------------- doing something with passed parameter from FirstScript.sh Please... (2 Replies)
Discussion started by: subodhbansal
2 Replies

4. Shell Programming and Scripting

replacing parameter in shell script

I have a script file as below named test1.sh sed -e 's/xxxkeys/$1/g' template1.asp > template1.txt sed -e 's/xxxkeys/$2/g' template2.asp > template2.txt sed -e 's/xxxkeys/$3/g' template3.asp > template3.txt sed -e 's/xxxkeys/$4/g' template4.asp > template4.txt I want to replace $1 with a,... (1 Reply)
Discussion started by: satgur
1 Replies

5. Shell Programming and Scripting

Shell script with date parameter

Hi All I have a shell script which calls all the Teradata Utiltyes . There is a sudden change in the requirment . What i'm asked to do is pass on the DATE to the shell script which should take the date automatically and run the utilityes. i.e. the date should not be passed on... (5 Replies)
Discussion started by: vinayrao
5 Replies

6. AIX

Passing a parameter to a shell script?

I would like to run a compress script on files in certain directories. My compress_script.sh is just basically compress file* In order for me to use this I have to copy it into each directory and run it. How can I state the directory on the command line with the compress script so it... (2 Replies)
Discussion started by: NycUnxer
2 Replies

7. Shell Programming and Scripting

parameter value change in shell script

How can i chnage the parameter value in shell script. file name is icare_mmi_cls.com, inside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com. can you please provide me with examples. Thanks Double post - check your PMs and follow the rules, thanks. (0 Replies)
Discussion started by: damodarreddys
0 Replies

8. UNIX for Dummies Questions & Answers

Parameter change in shell script

How can i chnage the parameter value in shell script. file name is icare_mmi_cls.com, iside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com. can you please provide me with examples. Thanks. (3 Replies)
Discussion started by: damodarreddys
3 Replies

9. Shell Programming and Scripting

Script Shell Parameter

Hi I have two shell script, the second script takes as a parameter the output variable of the first script, please how to retrieve the variable from the first script to pass as a parameter to the second script? Script1.sh i=0 i=$(($i + 1)) Script2.sh echo $1 Thank you (0 Replies)
Discussion started by: chercheur111
0 Replies

10. Shell Programming and Scripting

Read parameter file for a shell script

Hi All, I need urgent Help from all of you here. Below is my code- ================================================== #!/usr/bin/sh cd $1 cat $2 | tr -ds "$" "" > parameter_file.param export `parameter_file.param` chmod 777 parameter_file.param echo $1 echo $2 cd $prmDirInput... (5 Replies)
Discussion started by: Amit786
5 Replies
dxmkfontdir(1X) 														   dxmkfontdir(1X)

Name
       dxmkfontdir - Create a list of fonts for the X server.

Syntax
       dxmkfontdir [directory-names]

Description
       The  dxmkfontdir  command  creates  files  that list font names and the font files to which the names correspond, for use when the X server
       starts up.  In each directory specified as a command argument, dxmkfontdir creates the directory's list of fonts and places it  in  a  file
       called fonts.dir.  If you omit arguments, dxmkfontdir creates a fonts.dir file for the current directory.

       The  fonts.dir file lists each font file and gives the name of the font in that file.  To obtain font names, dxmkfontdir searches the files
       in the directory for a property named FONT. If the FONT property is absent, dxmkfontdir uses the names of PCF (.pcf), BDF (.bdf), and  com-
       pressed BDF (.bdf.Z) files, omitting their suffixes.  If a font exists in multiple formats, the PCF format is used.

       When  the  X server starts up, it looks for a fonts.dir file in each font directory in the font path.  It also looks for a fonts.alias file
       in each directory.

Font Aliases
       You can create or edit the fonts.alias file to assign new names to existing fonts.  X clients can then use the alias names to request fonts
       from  the server.  A font alias file can be in one or any number of directories in the font path.  It consists of two columns, separated by
       white space.  The first column lists aliases; the second column contains font name patterns.  Aliases can reference  fonts  in  directories
       other than the one in which the alias file exists.

       To embed white space in the alias name or the font name, enclose the name in  quotation marks ("").  To embed quotation marks (or any other
       characters), precede them with a backslash (.   The following are sample entries from a fonts.alias file:

       courier10			   fixed
       /udir/sally/fonts/courier/10.pcf    "-adobe-helvetica-bold-o-normal--
					    24-240-15-75-p-104-1508859-1"

       If the fonts.alias file contains the string FILE_NAMES_ALIASES alone on a line, each file name in the directory (without its  .pcf  suffix)
       is automatically translated as a font name alias. For example, a file named courier10.pcf would have the font name alias courier10.

See Also
       X(1X), dxfc(1X)

																   dxmkfontdir(1X)
All times are GMT -4. The time now is 02:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy