Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [solved]Korn, disabling * substitution Post 302744411 by Wreckoning on Friday 14th of December 2012 09:56:13 AM
Old 12-14-2012
[solved]Korn, disabling * substitution

If I execute the following line of code:

echo "*"

I get a list of files in the current directory.

What if all I wanted to do was display the asterisk itself? What does the code have to look like so all I get is an asterisk?

Thanks ahead of time for your assistance

---------- Post updated at 09:56 AM ---------- Previous update was at 09:51 AM ----------

Got my own answer:

echo *
and
echo "*"

Will list the contents of the current directory

echo '*'

Will display the single Asterisk
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

disabling telnet

how do i disable the telnet (2 Replies)
Discussion started by: rmuhammad
2 Replies

2. UNIX for Dummies Questions & Answers

disabling NIS

How do you disable a server, #1, from trying to use the NIS that is running on another server, #2? I would like the #1 server to just use the local etc/shadow file (3 Replies)
Discussion started by: calamine
3 Replies

3. Shell Programming and Scripting

[Solved] Command Substitution and Variable Expansion within a Case

Hello All, I don't write scripts very often, and in this case I am stumped, although it may be a bug in the version of bash I have to use (it's not my system). I want to extract a specific string snippet from a block of text (coming from a log file) that is dependent on a bunch of other... (1 Reply)
Discussion started by: jaimielives
1 Replies

4. Shell Programming and Scripting

[SOLVED] Capturing output in a korn variable

Hi, I'm new to korn and having trouble capturing the text output from one program in an array that I can then feed into another program. Direct approaches didn't work, so I've tried to break it down thus: The program lonlat2pixline gives the values I need in the second column, so I print that... (4 Replies)
Discussion started by: daurin
4 Replies

5. Solaris

Disabling sendmail

Hello everyone, can anyone tell me how to disable sendmail on solaris 10? I seem to have the sendmail process from hell. Did an SVCS | grep for mail and disabled the 2 processes it threw up. But something is still respawning sendmail (if I kill it manually) and it's doing the usual... (2 Replies)
Discussion started by: callmebob
2 Replies

6. Shell Programming and Scripting

Command substitution inside of a variable expression (AIX, KORN)

Hello all. This is my first post/question on this site. I’m a new Systems Analyst with previous experience with BASH. Although now I'm using AIX, and I’m trying to get a feel for the Korn shell (for those of you that don’t know AIX only uses the KORN shell). I hope I put this into the correct... (10 Replies)
Discussion started by: sydox
10 Replies

7. Shell Programming and Scripting

[Solved] Issue with using for loop as for in {2..6} in korn shell

Hi i have to cut columns 2 to 6 from a file and assign it to arrays , The following code works for ctcol in 2 3 4 5 6; do set -A a$ctcol $(cut -d, -f $ctcol test_file) done how ever this does not work for ctcol in {2..6}; do set -A a$ctcol $(cut -d, -f $ctcol test_file)... (4 Replies)
Discussion started by: 100bees
4 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Korn Shell execution

There are two Korn Shell scripts : script_1.ksh ( located in /home/dir1 ) script_2.ksh ( located in /home/dir2 ) Content of script_2.ksh is #!/usr/bin/ksh echo "Hello world.." The script_2.ksh is called from within script_1.ksh using the following command : ./home/dir2/script_2.ksh but... (7 Replies)
Discussion started by: kumarjt
7 Replies

9. Shell Programming and Scripting

[Solved] How to refer more than 9 command line inputs for a scripts in korn shell?

Hi all, I have a script which should take more than 9 command line inputs while running. Likescript.sh a s d f g h j j k l o p i u y t r e w Now in the script if I have to access one of the input which is at position after 9, in this case say 'p' then how can I do that? echo $12 will not work... (15 Replies)
Discussion started by: pat_pramod
15 Replies

10. Hardware

How disabling GPU?

Hi All I'm find out a way to disable the DGD: AMD Radeon HD 7470M on my Ubutu 16.04.2 LTS because radeon open source module is not capable to support this GPU and consequence the boot is very slow. I have tried serveral way with pci-stub.ids in the grub menu but not work. In general how... (11 Replies)
Discussion started by: _Fabio_79
11 Replies
XtFindFile()															      XtFindFile()

Name
  XtFindFile - search for a file using substitutions in a path.

Synopsis
  String XtFindFile(path, substitutions, num_substitutions, predicate)
	   String path;
	   Substitution substitutions;
	   Cardinal num_substitutions;
	   XtFilePredicate predicate;

Inputs
  path	    Specifies a path of file names including substitution characters.

  substitutions
	    Specifies a list of substitutions to make into the path.

  num_substitutions
	    Specifies the number of substitutions passed in.

  predicate Specifies a procedure called to judge each potential file name, or NULL.

Returns
  A filename, or NULL if no file was found.

Availability
  Release 4 and later.

Description
  XtFindFile()	performs the substitutions specified by substitutions on each colon-separated element of path in turn, and passes the result-
  ing string to predicate.  If predicate returns True, XtFindFile() returns the  string.   If  predicate  never  returns  True,  XtFindFile()
  returns NULL.

  Each	element  in substitutions is a structure that contains a character and a string.  If any element in path contains a percent sign fol-
  lowed by a character that appears in substitutions, then that two-character sequence will be replaced by the corresponding string  in  sub-
  stitutions.  The "Background" section below provides more details about the substitution process.

  If  predicate  is  NULL,  then  an  internal predicate is used that returns True if the string is the name of a readable file (and is not a
  directory), and returns False otherwise.  See XtFilePredicate(2) for more details on how to write a file predicate procedure.

  The caller must free the returned string with XtFree() when it is no longer needed.

Usage
  XtFindFile() is intended as a way to find a file that depends on variables such as the current setting of the locale, or the number of bit-
  planes  available on a screen.  Most applications can use the higher-level function XtResolvePathname() which provides a number of standard
  substitutions and a default path.

  The default predicate procedure is sufficient for most uses.	An application that wanted to find a directory rather than a file, for	exam-
  ple, would have to specify a custom predicate, as would an application that wanted to verify that a file was readable and that the contents
  of the file were reasonable would also have to provide a custom predicate procedure.

Background
  There are two substitution sequences that are treated specially:

  o  The character sequence %: (percent colon) specifies an embedded colon that is not a delimiter; the sequence  is  replaced	by  a  single
     colon.

  o  The  character  sequence  %%  (percent  percent)  specifies  a percent character that does not introduce a substitution; the sequence is
     replaced by a single percent character.

  A substitution string entry of NULL is equivalent to a pointer to an empty string.

  If the operating system does not interpret multiple embedded name separators in the path (i.e., "/" in POSIX) the same way as a single sep-
  arator,  XtFindFile() will collapse multiple separators into a single one after performing all string substitutions.	Except for collapsing
  embedded separators, the contents of the string substitutions are not interpreted by XtFindFile() and may therefore contain any  operating-
  system-dependent characters, including additional name separators.

Structures
  The Substitution type is defined as follows:

     typedef struct {
	 char match;
	 String substitution;
     } SubstitutionRec, *Substitution;

See Also
  XtResolvePathname(1),
  XtFilePredicate(2).

Xt - File Searching														      XtFindFile()
All times are GMT -4. The time now is 02:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy