Sponsored Content
Top Forums Shell Programming and Scripting Echo displays strange output when '?' is used Post 303046010 by RudiC on Tuesday 21st of April 2020 02:28:09 PM
Old 04-21-2020
I bet you have a P , a T , and a V file in your working directory, as ? is a "special pattern character" that "matches any single character" (cf man bash).
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Strange output from grep

Hi, I am getting different output for grep depending which directory I am in. The following is a transcript of my session, I am using egrep but have also used grep -E. The directory names have been changed for security: $pwd /dir1/dir2/dir3/dir4 $echo 000000 |egrep -v $echo $? 1 $cd ..... (10 Replies)
Discussion started by: Bab00shka
10 Replies

2. AIX

who -r displays no output

Hello. I have an AIX machine at 6100-00. We had some strange activity since filling up /tmp. One symptom is that who -r displays no output. It doesn't hang just no output is displayed. We are going to boot the machine, but prior to that I'd like to dig a bit to see what may be causing the... (0 Replies)
Discussion started by: maficdan
0 Replies

3. UNIX for Dummies Questions & Answers

Creating a file that contains output from a command, and then displays itself

hey, I'm trying to create the command that will create a file named user.txt that contains the output of the command cut -d: -f1,5 /etc/passwd, and displays itself afterwards. I don't know how to bridge cat > user.txt with cut -d: -f1,5 /etc/passwd, or how display it afterwards. Any help would... (2 Replies)
Discussion started by: raidkridley
2 Replies

4. Shell Programming and Scripting

strange output

I had a similar script in solaris and it had no problem. I wrote this one in freeBSD and it gave me strange output. Can anyone please tell me why? thanks a lot #!/bin/sh #This is a shell script that checks file system capacity mounted on /home directory #If file system is over 90% capacity,... (1 Reply)
Discussion started by: k2k
1 Replies

5. Solaris

solaris 10 strange df output

hi, in solaris 10 SUN SPARC V245 server the following df -h output is showing . can i reuse the following disk space by deleting them /platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1 20G 5.2G 14G 27% /platform/sun4u-us3/lib/libc_psr.so.1... (2 Replies)
Discussion started by: phani.madiraju
2 Replies

6. Solaris

ls -l displays output with an error

when i use ls command it works normal but when i using additional parameter with ls like ls -l , ls -a... it shows a error followed by the output. # ls -l ./hgfs: Operation not applicable total 12861 -rw-r--r-- 1 root root 0 Jun 1 21:12 1 drwxr-xr-x 2 root root ... (4 Replies)
Discussion started by: chidori
4 Replies

7. UNIX for Advanced & Expert Users

strange output with du

Can someone please explain why I get two outputs with the du command? The first one gave me one. I also didn't ask for the second directory so why did it give that directory? $ du -h "/media/Part 1/Desktop/playlist" 775M /media/Part 1/Desktop/playlist $ du -h "/media/Part... (1 Reply)
Discussion started by: cokedude
1 Replies

8. UNIX for Advanced & Expert Users

Strange /etc/passwd output

Can someone please explain this to me? auser:x:500:500:Anne User:/home/auser:/bin/sh buser:x:501:501:Bob User:/home/buser:/bin/bash I'm used to it looking like this. What is the difference between the first name and second name? In the first case I had to use the first name to change my... (3 Replies)
Discussion started by: cokedude
3 Replies

9. Shell Programming and Scripting

Echo's strange output

Hi, Kindly help me to understand the behavior or logic of the below shell command $ echo $!# echo $echo $ $ $ echo !$# echo $# 0 I am using GNU bash, version 3.2.25(1)-release (2 Replies)
Discussion started by: royalibrahim
2 Replies

10. Shell Programming and Scripting

Script Output Displays Multiple Text

Hello there, I'm using a read-while loop to preserve the word Failed within a text file. For example, if the word Failed exist twice in a single text file, my STDOUT should re-direct to a new text file and display Failed twice. My output is attached to this thread. I would like output to... (4 Replies)
Discussion started by: SysAdminRialto
4 Replies
WILDMAT(3)						     Library Functions Manual							WILDMAT(3)

NAME
wildmat - perform shell-style wildcard matching SYNOPSIS
int wildmat(text, pattern) char *text; char *pattern; DESCRIPTION
Wildmat is part of libinn (3). Wildmat compares the text against the pattern and returns non-zero if the pattern matches the text. The pattern is interpreted according to rules similar to shell filename wildcards, and not as a full regular expression such as those handled by the grep(1) family of programs or the regex(3) or regexp(3) set of routines. The pattern is interpreted as follows: x Turns off the special meaning of x and matches it directly; this is used mostly before a question mark or asterisk, and is not spe- cial inside square brackets. ? Matches any single character. * Matches any sequence of zero or more characters. [x...y] Matches any single character specified by the set x...y. A minus sign may be used to indicate a range of characters. That is, [0-5abc] is a shorthand for [012345abc]. More than one range may appear inside a character set; [0-9a-zA-Z._] matches almost all of the legal characters for a host name. The close bracket, ], may be used if it is the first character in the set. The minus sign, -, may be used if it is either the first or last character in the set. [^x...y] This matches any character not in the set x...y, which is interpreted as described above. For example, [^]-] matches any character other than a close bracket or minus sign. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> in 1986, and posted to Usenet several times since then, most notably in comp.sources.misc in March, 1991. Lars Mathiesen <thorinn@diku.dk> enhanced the multi-asterisk failure mode in early 1991. Rich and Lars increased the efficiency of star patterns and reposted it to comp.sources.misc in April, 1991. Robert Elz <kre@munnari.oz.au> added minus sign and close bracket handling in June, 1991. This is revision 1.10, dated 1992/04/03. SEE ALSO
grep(1), regex(3), regexp(3). WILDMAT(3)
All times are GMT -4. The time now is 12:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy