Hi guys,
does anyone know how to test for a regular expression - i want to include it in a script to make sure the variable is a regexp
cheers (1 Reply)
i have a list of text
a
b
c
d
e My desired output is
'a','b','c','d','e'
any advise? My file was actually in excel format, i copied out the column into notepad. I am not sure if the \n exists in between. (2 Replies)
hey guys,
i'm having some problems with my understanding of this whole regexp thing.
I'm just exploring here really by trying to do various match & filter & print stuff on the console.
I figured i want to get the IP of an interface. So my idea here was that first i filter to extract only... (4 Replies)
I'd like to know if there is a catchall line for renaming the following patterns:
s01e03 -> 01x03
s4e9 -> 04x09
s10e08 ->10x08
and possibly even:
318 -> 03x18
1002 ->10x02
if its the first 3 or first digit number in the string.
thanks! (0 Replies)
Good Day,
Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp.
sed -n '/regexp/{n;p;}' filename
What if my regexp is 3 word or a sentence. Im... (3 Replies)
My input file looks like this:
13154|X,the deer hunter
13154|Y,the good life
1316|,american idol
1316|,bowling
1316|,chuck
etc...
The X, Y, or any other character (besides a comma) after the pipe is a "Device Type". I want to strip out lines that do not have a device type.
I have... (2 Replies)
I would like to extract "1333 Fairlane" given the below text.
The word "Building:" is always present. The wording between Building and the beginning of the address can be almost anything. It appears the the hyphen is there most of the time.
Campus: Fairlane Business Park
Building:... (9 Replies)
groups(1B) SunOS/BSD Compatibility Package Commands groups(1B)NAME
groups - display a user's group memberships
SYNOPSIS
/usr/ucb/groups [user]...
DESCRIPTION
With no arguments, groups displays the groups to which you belong; else it displays the groups to which the user belongs. Each user
belongs to a group specified in the password file /etc/passwd and possibly to other groups as specified in the file /etc/group. If you do
not own a file but belong to the group which it is owned by then you are granted group access to the file.
FILES
/etc/passwd
/etc/group
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO getgroups(2), attributes(5)NOTES
This command is obsolete.
SunOS 5.11 14 Sep 1992 groups(1B)