04-24-2019
In a regular expression (RE) the ^ means the beginning of the line; together with the = it enforces an exact match. Omit the ^ and it must only end with the given pattern.
$1 ~ /.*(NAME$|DIR$|PATH$)/ is correct, because the $1 field is = delimited, and in a RE the $ enforces the end of the field. The .* means any characters but is not needed here because any leading characters are always permitted in a RE (unless there is a ^ anchor). So it is optimized $1 ~ /NAME$|DIR$|PATH$/ or with a common $ anchor $1 ~ /(NAME|DIR|PATH)$/.
Last edited by MadeInGermany; 04-24-2019 at 03:03 AM..
This User Gave Thanks to MadeInGermany For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a few questions about Unix. Can you please help!
1.How do I create an alias that greps the password file for my username and returns my password file entry? Once I get the alias to work I want to be able to let a friend use it .So that he can use the alias to locate his password entry... (1 Reply)
Discussion started by: JJJ
1 Replies
2. UNIX for Dummies Questions & Answers
friends i wanted to now whehter there exists a book as a solution to the questions posted in exercies of the Design of Unix Operating system by Maurice J Bach !..its really urgent !! (1 Reply)
Discussion started by: darshaan
1 Replies
3. UNIX for Dummies Questions & Answers
hi friends,
How to obtain list of groups we r a member of and redirect it to a file.
how to append the details of current OS to a file.
how to append the estimated file space to a file.
how to append the details of users loged on along wth their current activity into a file.
Thank you...I'm... (3 Replies)
Discussion started by: bobby36
3 Replies
4. Shell Programming and Scripting
Hi all,
i need to write an ls command which will pick up
ind_01.txt/pak_01.txt from
ind_01.txt
pak_01.txt
usa_01.txt
files in a directory..
i wrote a ls command by storing ind and pak in 2 variables and listing it. Its working fine. But the pattern to be matched should be sent in... (1 Reply)
Discussion started by: anju
1 Replies
5. Shell Programming and Scripting
Hi,
I have multiple servers and each server hosts multiple databases. Now i have requirement as below
1) Create a file in any server which will hold all the database name.
2) Write a shell script that will read the file and connect to each and every database. and log out of it one by... (2 Replies)
Discussion started by: amritansur
2 Replies
6. Shell Programming and Scripting
i define a function outside the nawk command which trims the leading and trailing spaces like
function TrimSpace(x)
{
y=gsub(/^+|+$/,"",x)
{
return x
}
}
and i want to call this function in nawk commad like.
nawk '{print TrimSpace($1)}' file
Note:... (2 Replies)
Discussion started by: malikshahid85
2 Replies
7. UNIX for Dummies Questions & Answers
Hi I m creating a file which will serve as a virtual harddisk .
I m using following command to create a file.
#dd if=/dev/zero of=/tmp/Sample.dat bs=1M count=1024
I have following doubts regarding the operation.
1) In above example i m creating a file with byte size of 1M .However in... (1 Reply)
Discussion started by: pinga123
1 Replies
8. Shell Programming and Scripting
Hi,
I am new to Shell Scripting.
I need to pick the files from one directory and place them in another directory based on time stamp.It should pick the files if the files is not accessed for 1 hour.
Can any one please help me how to work on this.
Thanks in Advance.
Regards,
Prakash (1 Reply)
Discussion started by: kvrprakash
1 Replies
9. Homework & Coursework Questions
1 Petras Pavardenis 1980 5
08 Linas Bajoriunas 1970 10
3 Saulius Matikaitis 1982 2
5 Mindaugas Stulgis 1990 7
6 Rimas Nasickis 1964 10
7 ... (1 Reply)
Discussion started by: vaidastf
1 Replies
10. Shell Programming and Scripting
Hi,
I have the date as 20130101 and i need it to rephrased to 2013-01-01.
Any command which can do this. (5 Replies)
Discussion started by: ATWC
5 Replies
LEARN ABOUT DEBIAN
gst-package
GST-PACKAGE(1) User Commands GST-PACKAGE(1)
NAME
gst-package - create and install GNU Smalltalk .star package files
DESCRIPTION
Usage:
gst-package [OPTION]... ARGS...
Operation modes:
--install
make or install STAR packages (default)
--uninstall
remove the packages mentioned in the FILES
--dist copy files instead of creating STAR files.
--prepare
create configure.ac or Makefile.am
--list-files PKG
just output the list of files in the package
--list-packages
just output the list of packages in the files
--download, --update
download package from smalltalk.gnu.org or from its specified URL
--help display this message and exit
--version
print version information and exit
Common suboptions:
-n, --dry-run
print commands without running them
--srcdir DIR
look for non-built files in directory DIR
--distdir DIR
for --dist, place files in directory DIR
--destdir DIR
prefix the destination directory with DIR
--target-directory DIR
install the files in DIR (unused for --dist)
-I, --image-file=FILE
load into the specified image
--kernel-dir=PATH
use the specified kernel directory
-v, --verbose
print extra information while processing
--install suboptions:
--test run unit tests after merging
--load also load the Smalltalk files in the image
--list-files suboptions:
--load only list files that are filed in when loading
--test with --load, also include unit test files
--vpath
Omit path to srcdir for files that are there
--dist suboptions:
--all-files
Process all files, not just non-built ones
--copy Do not create symbolic links
All operation modes except --download (or its synonym --update) accept paths to package.xml files or .star files, including remote URLs.
--download and --update accept names of packages, which will be searched in the current system or on smalltalk.gnu.org) or URLs to pack-
age.xml or .star files.
Except in uninstall and list files mode, gst-package requires write access to the GNU Smalltalk image directory, and merges the XML package
files on the command line with that file.
The default target directory is /build/buildd-gnu-smalltalk_3.2.4-2-amd64-LVoFQd/gnu-smalltalk-3.2.4
SEE ALSO
The full documentation for gst-package is maintained as a Texinfo manual. If the info and gst-package programs are properly installed at
your site, the command
info gst
should give you access to the complete manual.
gst-package version 3.2.4 December 2011 GST-PACKAGE(1)