Sponsored Content
Top Forums Shell Programming and Scripting How can I just grep one instance of a word in the file Post 302657847 by jcnewton13 on Monday 18th of June 2012 11:45:49 AM
Old 06-18-2012
How can I just grep one instance of a word in the file

I want to grep some information out of the dmidecode but when I type

Code:
dmidecode | grep Memory

I get several instances of the word. Is there a way I can just choose which instance I want to display?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to grep for a word in a log file..

Hi All, I have a log file which is storing a backup time stamps information in it. (pasted below) 20081006210008 0 20081006211910 20081006222824 0 20081006224758 20081007210049 0 ... (2 Replies)
Discussion started by: suri.tyson
2 Replies

2. Shell Programming and Scripting

grep second word in a file

How do I match second word and then print that line to output For eg: My file has following text and I want to check if second word is n then I want to print entire line . xytxti8naclip y xytxt32bpsimple y xytxt32bpna n xytxti16nae y xysmps32bpp031_bst n... (7 Replies)
Discussion started by: pitagi
7 Replies

3. UNIX for Dummies Questions & Answers

Grep the word at the end of the file

I need to grep the word "hello" in each and every file. This word will be placed either at the end of the file or before the end of the file. Ex: file1: file2: afdsaf dsfalk fdsa weruoi sdaf erwqiuo fsdaf ... (5 Replies)
Discussion started by: sivakumar.rj
5 Replies

4. Shell Programming and Scripting

Search for last instance of word in a file

Hi I'm trying to search for the last instance of the word 'cache' in a HTML file that I have downloaded from YouTube. I'm using the following syntax, but an error is thrown when I try it. grep -f "cache" Also I wish to append the above grep command to the below so that the search for cache... (3 Replies)
Discussion started by: colmbell
3 Replies

5. Shell Programming and Scripting

Search text file, then grep next instance of string

I need to be able to search for a beginning line header, then use grep or something else to get the very next instance of a particular string, which will ALWAYS be in "Line5". What I have is some data that appears like this: Line1 Line2 Line3 Line4 Line5 Line6 Line7 Line1 Line2 ...... (4 Replies)
Discussion started by: Akilleez
4 Replies

6. Shell Programming and Scripting

grep second instance of same string

Hi all, i am new to unix scripting in ksh or any shell for that matter. I have downloaded a xml file from a website and saved on my local harddrive. inside the xml, the same tag is listed multiple times. <title>Tonight</title> <title>Thursday</title> <title>Friday</title>... (6 Replies)
Discussion started by: scubasteve39
6 Replies

7. Shell Programming and Scripting

grep for a string until instance of a space

Hey guys, I'm having a bit of trouble getting this to work using either sed or grep. It's possible awk might be the ticket I need as well, but my regulat expression skills aren't quite up to the task for doing this. I'm looking to grep for the string ERROR from the following log up until any... (6 Replies)
Discussion started by: terrell
6 Replies

8. UNIX for Advanced & Expert Users

Grep the only instance name

Hi, I want to get the only application name from the server. Ex: if i give $ ps -ef | grep bw. It will show all BW process with entire path. It will little confuse to list out the process. Can anyone have syntax to get only the instance name. I need this for be, hawk,ems also. Please... (2 Replies)
Discussion started by: ckchelladurai
2 Replies

9. Shell Programming and Scripting

One instance of comparing grep and awk

Hi. In thread https://www.unix.com/shell-programming-and-scripting/267833-grouping-counting.html rovf and I had a mini-discussion on grep and awk. Here is a demo script that compares the awk and grep approaches for this single problem: #!/usr/bin/env bash # @(#) s2 Demonstrate group... (1 Reply)
Discussion started by: drl
1 Replies

10. UNIX for Beginners Questions & Answers

How to Grep second word in config file using parameter?

Currently i am building one script to grep region records in the config file based on parameter and then i am creating a text file with that out put and i am reading the source file path in that out put file now i need to pass one more parameter like module based upon that it has to create a... (1 Reply)
Discussion started by: saranath
1 Replies
BIOSDECODE(8)						      System Manager's Manual						     BIOSDECODE(8)

NAME
biosdecode - BIOS information decoder SYNOPSIS
biosdecode [OPTIONS] DESCRIPTION
biosdecode parses the BIOS memory and prints information about all structures (or entry points) it knows of. Currently known entry point types are: o SMBIOS (System Management BIOS) Use dmidecode for a more detailed output. o DMI (Desktop Management Interface, a legacy version of SMBIOS) Use dmidecode for a more detailed output. o SYSID o PNP (Plug and Play) o ACPI (Advanced Configuration and Power Interface) o BIOS32 (BIOS32 Service Directory) o PIR (PCI IRQ Routing) o 32OS (BIOS32 Extension, Compaq-specific) See ownership for a Compaq ownership tag retrieval tool. o SNY (Sony-specific, not decoded) o VPD (Vital Product Data, IBM-specific) Use vpddecode for a more detailed output. o FJKEYINF (Application Panel, Fujitsu-specific) biosdecode started its life as a part of dmidecode but as more entry point types were added, if was moved to a different program. OPTIONS
-d, --dev-mem FILE Read memory from device FILE (default: /dev/mem) -h, --help Display usage information and exit -V, --version Display the version and exit FILES
/dev/mem BUGS
Most of the time, biosdecode prints too much information (you don't really care about addresses) or not enough (because it doesn't follow pointers and has no lookup tables). AUTHORS
Alan Cox, Jean Delvare SEE ALSO
dmidecode(8), mem(4), ownership(8), vpddecode(8) dmidecode February 2007 BIOSDECODE(8)
All times are GMT -4. The time now is 04:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy