Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Newbie Help with Grep or Awk .. Easy one ... Post 302279331 by kthatch on Thursday 22nd of January 2009 12:26:43 PM
Old 01-22-2009
Newbie Help with Grep or Awk .. Easy one ...

I have this output:

uniquemember=uid=315kthatch,ou=people,ou=client315,dc=paisleyhosting,dc=com

and i want the output to be just this:

315kthatch

I need it to be generic tho, because I have hundreds of lines of output, and the preceding numbers are not always 315. So I would need everything that equals "uid=*"
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help on installing an EASY to use and easy to install command line text editor

Hi again. Sorry if it seems like I'm spamming the boards a bit, but I figured I might as well ask all the questions I need answers to at once, and hopefully at least get some. I have installed Solaris 10 on a server. The default text editors are there (vi, ex, ed, maybe others, I know emacs is... (4 Replies)
Discussion started by: EugeneG
4 Replies

2. Shell Programming and Scripting

GREP Searching for a newbie...

Hi, I really need some help with GREP searching... I need to find all occurances of a file reference and remove two characters from the end of the reference. For example, here are a few lines showing the text: <image file="STRAIGHT_004CR.jpg" ALT="STRAIGHT_004CR.jpg" /> <image... (8 Replies)
Discussion started by: steveglevin
8 Replies

3. Shell Programming and Scripting

Newbie with an easy question

I'm looking to write a script that takes a certain directory and gzips all its files that are older than 2 days. I've done some research but for the life of me, I can't even get any files gzipped. Any help would be greatly appreciated! (3 Replies)
Discussion started by: adrockrocks
3 Replies

4. UNIX for Dummies Questions & Answers

Simple newbie grep question

How come grep testfile1 won't find anything in testfile1 (even though the characters sd are there in great quantity), but grep '' testfile1 will find plenty? Do the single quotes prevent the shell from interpreting the testfile1 is interpreted as: grep *test whether or not characters sd exist*... (5 Replies)
Discussion started by: doubleminus
5 Replies

5. Shell Programming and Scripting

AWK Help ME! this easy for who know

Friends; I have little experience with shell and I am not able to resolve this problem: file1: CRA-JJ-W980-01; 2009-11-24; GigabitEthernet; 0/0 CRA-JJ-W980-01; 2009-11-24; GigabitEthernet;1/0 CRA-JJ-W980-01;2009-11-24;GigabitEthernet;3/0... (5 Replies)
Discussion started by: He2
5 Replies

6. Shell Programming and Scripting

easy grep question

pattern matching porblem. I have a file with lines like this: hdisk2 blah 03 hdisk3 blah 03 hdisk21 blat 06 hdisk23 blah 06 hdisk210 blat 06 So I want to grep for just hdisk2, but I get back as you would expect hdisk2 dhsik21 hdisk23 hdisk210 I tried several... (1 Reply)
Discussion started by: adder2
1 Replies

7. UNIX for Dummies Questions & Answers

Easy Grep Question

This seems like an easy question, but I can't find an answer already posted. I want a command to return all of the lines in a file containing exactly a string I tried grep -x "372701" x.txt but this did not return anything I am just trying to search a file for lines which contain... (4 Replies)
Discussion started by: jgrosecl
4 Replies

8. UNIX for Dummies Questions & Answers

Should be an easy GREP question...

Two things. 1. I need to list all the jpg that start with a specific pattern and I tried using wildcards and can't get it to work. Basically: grep "cpd*.jpg" myfile.sgm return all entries that start with cpd (wildcard) and jpg but this does not work and I can't find another option--I'm... (4 Replies)
Discussion started by: jcor826
4 Replies

9. Shell Programming and Scripting

awk easy question

So, I have the following code: cat testfile.txt | awk -F, '{ print $1" "$2" "$3" "$4" "$5 }' | read DOC ORG NAME echo "$DOC" echo "$ORG" echo "$NAME" My testfile.txt looks something like the following: Document Type,Project Number,Org ID,Invoice Number It will eventually be more... (14 Replies)
Discussion started by: Parrakarry
14 Replies

10. Shell Programming and Scripting

Newbie looking for how to Grep times more than 10 seconds apart

I am new to grep and Linux and am looking to see if grep can parse out a list of lines that have a difference of more than 10 seconds between the times on each line. Example 2016-09-17 19:30:57 INFO: id: 4562079216, time: 2016-09-17 19:30:41, 2016-09-17 12:02:26 INFO: id:... (26 Replies)
Discussion started by: Markham
26 Replies
list_devices(1)                                                                                                                    list_devices(1)

NAME
list_devices - list allocatable devices SYNOPSIS
list_devices [-s] [ -U uid] -l [device] list_devices [-s] [ -U uid] -n [device] list_devices [-s] [ -U uid] -u [device] The list_devices utility lists the allocatable devices in the system according to specified qualifications. The device and all device special files associated with the device are listed. The device argument is optional and, if it is not present, all relevant devices are listed. The following options are supported: -l [device] Lists the pathname(s) of the device special files associated with the device that are allocatable to the current process. If device is given, lists only the files associated with the specified device. -n [device] Lists the pathname(s) of device special files associated with the device that are allocatable to the current process but are not currently allocated. If device is given, lists only the files associated with that device. -s Silent. Suppresses any diagnostic output. -u [device] Lists the pathname(s) of device special files, associated with the device that are allocated to the owner of the current process. If device is given, list only the files associated with that device. -U uid Uses the user ID uid instead of the real user ID of the current process when performing the list_devices operation. Only a user with the solaris.device.revoke authorization can use this option. The following exit values are returned: non--zero An error occurred. /etc/security/device_allocate /etc/security/device_maps /etc/security/dev/* /usr/security/lib/* See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ allocate(1), deallocate(1), bsmconv(1M), dminfo(1M), mkdevalloc(1M), mkdevmaps(1M), device_allocate(4), device_maps(4), attributes(5) The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information. /etc/security/dev, mkdevalloc(1M), and mkdevmaps(1M) might not be supported in a future release of the Solaris Operating Environment. 28 Mar 2005 list_devices(1)
All times are GMT -4. The time now is 09:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy