01-11-2019
Hi, the order is in collating order (the first-to-last order of characters in the code set).
Quote:
If the pattern matches any existing filenames or pathnames, the pattern shall be replaced with those filenames and pathnames, sorted according to the collating sequence in effect in the current locale. If the pattern contains an invalid bracket expression or does not match any existing filenames or pathnames, the pattern string shall be left unchanged.
Shell Command Language
Note that
XYZ*.txt will only match one of the two files that you mention, since the other one starts with
XYX
These 2 Users Gave Thanks to Scrutinizer For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to process a list of files matching: GPS*\.xyz with an awk script. I would then like to output the files to GPS*\.xyz.out (e.g. the same file name appended with .out). Something like:
awk '{if(NR==1) {offset=-$1}; $1=$1+offset; print }' GPS*.xyz
this does exactly what I want EXCEPT... (3 Replies)
Discussion started by: franzke
3 Replies
2. Shell Programming and Scripting
I am on HP-UX and I am trying to come up with a method to call in a list of files named like so.
filename020107.dat filename020207.dat filename020307.dat
Obviously I can list them ls them like so, ls filename*.dat. In case you did not notice the number is a date and I was hoping to match... (4 Replies)
Discussion started by: scotbuff
4 Replies
3. Shell Programming and Scripting
How can I pass in an argument such as "*.k" to a bash script
without having to double-quote *.k and not having *.k
`glob` to match all files in the pattern?
I tried using noglob in my script but this didn't work the way I thought
it would.. expansion is still occuring, $# is higher than I... (3 Replies)
Discussion started by: zoo591
3 Replies
4. Shell Programming and Scripting
Hi,
I have a requirement where i need to write a script to create the new file from the given input file with the data in reverse order (bottom to top)
Sample data:
Input File--------------
Java
VB
Oracle
Teradata
Informatica
Output file:-----------------
Informatica
Teradata
Oracle... (3 Replies)
Discussion started by: srilaxmi
3 Replies
5. Shell Programming and Scripting
My script(3 arguments $1 = folder,$2 extension,$3 string) should do the following things:
-Enter in the folder of $1(if exists).
-Put ls *.$2 > temp.txt ( I use a temp file to store the result of ls command and if $2 = txt in this file I'll have all the .txt files of the folder)
-Now I want to... (2 Replies)
Discussion started by: Max89
2 Replies
6. UNIX for Advanced & Expert Users
This is my input file :
FCBAFE572C5E4BA29B3F8030BD480A94,907 ,1/1/2003,12/31/2005,ACT,1,2010-05-07 04:42:26.380000
2345AD5D2BFB29C821C1BC3DE8B746A7,907 ,1/1/2004,1/31/2005,ACT,1,2010-05-07 04:42:26.380000
E45B7371EEC0D1AB00E1750B5BC661F7,907 ,1/1/2004,12/31/2006,ACT,1,2010-05-07... (14 Replies)
Discussion started by: gpsridhar
14 Replies
7. Shell Programming and Scripting
Hi guys,
Here is a simple script. It writes the current time to specific files in a directory.
The arguments are the names of the files to write the date to (without path nor extension).
root:~# cat /usr/local/bin/dummy.sh
#!/bin/sh -e
for file in $@; do
date >> /var/lib/$file.dat... (11 Replies)
Discussion started by: chebarbudo
11 Replies
8. UNIX for Dummies Questions & Answers
hi guys,
jus some file globbing questions
sed "s/^.*on//"
what does the full stop and asterisk means?
i onli know that ^ means inverse or not (1 Reply)
Discussion started by: ment0smintz
1 Replies
9. Shell Programming and Scripting
$ ls -1
a.1
b.1
x_a.1
x_b.1
$ ls -1 *
b.1
x_a.1
x_b.1
$ ls -1 **
a.1
b.1
x_a.1
x_b.1The last result is not as expected.
Why?
Thanks. (2 Replies)
Discussion started by: carloszhang
2 Replies
10. Shell Programming and Scripting
Hello,
I am trying to replace the position of each row by the next row.
OS: Ubuntu 18.04, bionic
I'd appreciate your help.
input_file:
-O fileA
wget http://x.y.z./a
-O fileB
wget http://a.b.c./d
-O fileC
wget http://q.f.s/t
..
..
..
-O fileZZ
wget http://r.t.y/u
I expect: (6 Replies)
Discussion started by: baris35
6 Replies