Sponsored Content
Full Discussion: Grep into columns
Top Forums UNIX for Dummies Questions & Answers Grep into columns Post 302858461 by rbatte1 on Monday 30th of September 2013 12:28:35 PM
Old 09-30-2013
What output do you get from your pkginfo command? If we can see that, then I'm sure we can help.

What do you need the output to look like? Remember that spreadsheet applications will read lots of data formats, so they could be fixed width or delimited (comma, space, pipe, @ or other separator)

What have you tried to do so far to get from the pkginfo format into what you need?



Robin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using Grep for only a certain number of columns

I am given a file with a list of names for the first 20 characters. The 20 characters after is a list of names that somebody is supposed to team up with. Now i'm trying to write a simple script that will read a name somebody inputs and then looks only in the first 20 characters. For example.... (2 Replies)
Discussion started by: MaestroRage
2 Replies

2. UNIX for Advanced & Expert Users

Grep all the columns based on a particular column

This is the data file that I have 21879, 0, 22, 58, 388 0, -1, 300, 1219172589765, 1708, 0, 200, 21891, 0, 0, 33, 309 0, -1, 300, 1219172591478, 1768, 0, 200, 22505, 0, 0, 33, 339 0, -1, 300, 1219172593251, 1738, 0, 200, 21888, 0, 1, 33, 308 0, -1, 300, 1219172594995, 633, 0, 200, 24878,... (2 Replies)
Discussion started by: pmallur
2 Replies

3. Shell Programming and Scripting

grep required data from two columns

hello, I have output from a command and I need to filter some info out of that. I tried awk command but I can not grep what I am looking for: Following is the output and I need to capture "disabled" for each volume from first column and report: # vol status Volume State ... (2 Replies)
Discussion started by: za_7565
2 Replies

4. Shell Programming and Scripting

Grep based on specific columns.

Hi, How can I grep a record for a value based on specific column. If I simply do a grep 'AB' FilenName.txt, I might end up getting the records returned whose part of value is 'AB'. But I want it specific to second column. cut -d'|' -f 2 FileName.txt | grep 'AB' But now it will return... (1 Reply)
Discussion started by: deepakwins
1 Replies

5. UNIX for Dummies Questions & Answers

grep only from a range of columns

Hello all, I have a .csv file with over 100 columns. I would like to grep for a pattern only searching within a range of those fields, and print the entire line. For example: grep a pattern from columns $47-$87, but print fields $0 - $100 Thanks! (9 Replies)
Discussion started by: torchij
9 Replies

6. Shell Programming and Scripting

grep on columns

Hi, my data is this way abc def 01000000 kil ghi 23 01000000 kim ghj 0000 01000000 omg now, I would like to replace 01000000 on the third column as 0. I have a file with that value in different columns. So, any awk one liner that can let me change the column $ value would be highly... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

7. Shell Programming and Scripting

Grep and convert into columns

I have 1000 different autosys jobs, want to extract only this information using unix commands. Tried with normail greping but unable to make columns into rows. Input: /* ----------------- template ----------------- */ insert_job: template job_type: c box_name: box1 command:... (3 Replies)
Discussion started by: onesuri
3 Replies

8. Shell Programming and Scripting

Grep and print only certain columns from a row

Hi Friends, This is my input chr1 100 200 + gene_name "alpha"; protein_name "alpha"; level 2; tag "basic"; info "known"; chr1 245 290 + gene_name "alpha-1"; protein_name "alpha-2"; level 9; tag "basic"; info "uknown"; chr1 310 320 + gene_name "alpha"; protein_name "alpha-4"; level 2; info... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

9. Shell Programming and Scripting

Grep in multiple columns

Hi All, One of my source file is having more than 100 columns. Now, I need to check the particular string in 75th,76th and 79th columns of the source file. If I find the particular string in above mentioned columns, then I need to print the entire record with line number. Kindly help... (2 Replies)
Discussion started by: suresh_target
2 Replies

10. UNIX for Dummies Questions & Answers

Grep in specific columns

I am trying to search a list of strings from a file and display the string as well as the column in the search file it was found. I dont care about the row. what is wrong with my script? while read line; do awk -v var="$line" '{for(i=1;i<NF;i++) if ($NF==$var) break; print $var FS $NF' }'... (3 Replies)
Discussion started by: senhia83
3 Replies
patchmedia(1M)						  System Administration Commands					    patchmedia(1M)

NAME
patchmedia - modify Solaris media with patches and packages SYNOPSIS
/usr/bin/patchmedia -d media-root [-v] [-o iso] [-l label] pkg_or_patch [pkg_or_patch ...] DESCRIPTION
The patchmedia utility takes a list of patches and packages as input and updates the install miniroot in media-root (the root directory of an on-disk image of a Solaris installation media) to include the specified patches and packages. These patches and packages are also placed in a subdirectory called DU under the Solaris install image. For example: media-root/Solaris_10/DU When booting a system from the updated media, the patches and packages will be part of the booted Solaris image. They will also be applied to the target system being installed at the end of the installation process. If -o is specified, a bootable ISO image is created in the file media.iso that contains the Solaris install media. The ISO image can then be burned onto a CD/DVD with utilities such as cdrw(1) or cdrecord(1). (The latter is not a SunOS man page.) OPTIONS
The following options are supported: -d media-root Top-level directory of on-disk image of Solaris installation media. This is option must be specified. -o iso Create a Solaris ISO image of media-root. -l label Label/volume name of the ISO image (if -o option is specified). If -o is not specified, the name of Solaris directory under media-root, for example, Solaris_10, will be used. -v Verbose. Multiple -v options increase verbosity. OPERANDS
The following operands are supported: pkg_or_patch [pkg_or_patch ...] One or more patches or packages (you can have both patches and packages in a single command) with which the Solaris installation media media-root will be updated. EXAMPLES
Example 1 Updating a Solaris Install Image with Patch and Package The following command updates the Solaris install image in s10u1 by adding patch 123456-07 and package SUNWfoo. # /usr/bin/patchmedia -d s10u1 SUNWfoo 123456-07 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
cdrw(1), mkcd(1M), attributes(5) mkisofs(8), (/usr/share/man/man8/mkisofs.8), in the SUNWfsman package (not a SunOS man page) SunOS 5.11 29 Jul 2008 patchmedia(1M)
All times are GMT -4. The time now is 10:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy