It does work, but you need to be somewhere else (not in the directory you use it from, since on its own their's no chance to give the link another name):
I'm trying to delete lines from a large text file using VI.
Every line that I am wanting to delete start with 'S' - all others do not. (A list of users)
I've tried using * but doesn't seem to like it...any ideas...
Doesn't have to be VI - but I'm better with VI than sed/awk. (8 Replies)
when writing a shell script (bourne) and using a unix command like 'ls' is there anything special you need to do to use a wildcard (like *)? (3 Replies)
ok, I'm trying to write a script file that lists files with specific elements in the name into a txt file, it looks like this
ls s*.dat > file_names.txt
can't figure out whats wrong with that line, any ideas?
thanks in advance (10 Replies)
Hello
i am trying to use the wildcards with the if statement but it is displaying the error like this one
if * | ** | * ]
Any body can help me to for using the wild card option in the if case but i have used this code and working well with the case statement to enter the name without the... (14 Replies)
Hi All
Please excuse another straightforward question. When creating a tar archive from a directory I am attempting to use wildcards to eliminate certain filetypes (otherwise the archive gets too large). So I am looking for something along these lines.
tar -cf archive.tar * <minus all *.rst... (5 Replies)
These 2 websites do a GREAT job of explaining different types of wildcards. I learned about the categories of characters which I never knew about at all.
GNU/Linux Command-Line Tools Guide - Wildcards
GREP (1 Reply)
I'm trying to delete everything between ( and ) in a line, ie: ( start xxxx, end xxx ). there is uppercase, lowercase and numbers in the parans. and are of varied length.
I tried this:
sed 's/()//' infile > outfileI'm not understanding the wildcard use in brackets (2 Replies)
Hello everyone. My first time posting here.
I have a question that may seem very insignificant to some but is one that I've been trying to address for the past several days (haven't had any luck looking online).
I'm trying to clean a directory by removing old files that we no longer need.... (2 Replies)
Hello:
I have a very basic question. I'd like to select all files except for one file. For example, say I want to move all of the files in my current directory to a subdirectory called archive, I would use mv ./* archive/ But what if I want to move all files except for README.txt? Is there an... (19 Replies)
Hi, I'm new to Unix, but have a directory which has many files in it, well over 1000. The files are called :
M07GO.STOPE0001
M07GO.STOPE0002
M07GO.STOPE0003
M07GO.STOPE0004
etc...
I would like to rename them to the following :
M070001.bin
M070002.bin
M070003.bin
M070004.bin
etc....... (4 Replies)
Discussion started by: rnmuk
4 Replies
LEARN ABOUT MOJAVE
user::grent5.18
User::grent(3pm) Perl Programmers Reference Guide User::grent(3pm)NAME
User::grent - by-name interface to Perl's built-in getgr*() functions
SYNOPSIS
use User::grent;
$gr = getgrgid(0) or die "No group zero";
if ( $gr->name eq 'wheel' && @{$gr->members} > 1 ) {
print "gid zero name wheel, with other members";
}
use User::grent qw(:FIELDS);
getgrgid(0) or die "No group zero";
if ( $gr_name eq 'wheel' && @gr_members > 1 ) {
print "gid zero name wheel, with other members";
}
$gr = getgr($whoever);
DESCRIPTION
This module's default exports override the core getgrent(), getgruid(), and getgrnam() functions, replacing them with versions that return
"User::grent" objects. This object has methods that return the similarly named structure field name from the C's passwd structure from
grp.h; namely name, passwd, gid, and members (not mem). The first three return scalars, the last an array reference.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that
this still overrides your core functions.) Access these fields as variables named with a preceding "gr_". Thus, "$group_obj->gid()"
corresponds to $gr_gid if you import the fields. Array references are available as regular array variables, so "@{ $group_obj->members()
}" would be simply @gr_members.
The getpw() function is a simple front-end that forwards a numeric argument to getpwuid() and the rest to getpwnam().
To access this functionality without the core overrides, pass the "use" an empty import list, and then access function functions with their
full qualified names. On the other hand, the built-ins are still available via the "CORE::" pseudo-package.
NOTE
While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this.
AUTHOR
Tom Christiansen
perl v5.18.2 2013-11-04 User::grent(3pm)