Sponsored Content
Full Discussion: awk issue
Top Forums Shell Programming and Scripting awk issue Post 302737645 by Jared on Thursday 29th of November 2012 11:08:15 AM
Old 11-29-2012
awk issue

Hi all,

i am trying to use below command to see the output of hardware inventory, but i only see 2 first line no output of the command.

Code:
awk '/Hardware/ {print $0}' XXX_result.txt 
Hardware inventory:
Hardware inventory:

any idea how to see whatever is under hardware inventory.

i will really appreciate your help!

jared

Last edited by Scott; 11-29-2012 at 12:15 PM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk issue

Hi, # grep "^Listen" httpd.conf | awk '{print $2}' FrontEnd_1_IP:8081 FrontEnd_2_IP:8081 8081 8082 8083 # I need to get the values one at a time but I just can't manage to do that. Thanks, Bianca (20 Replies)
Discussion started by: potro
20 Replies

2. Shell Programming and Scripting

Awk issue

Can someone please explain below code. $LIST|awk ' /^$/ { next } substr($0,1,4)=="Exiting" { mk = 1; next } mk==1 { print $3,$7,$10,$14; exit } Cheers, gehlnar (5 Replies)
Discussion started by: gehlnar
5 Replies

3. Shell Programming and Scripting

Issue in awk

In the following code, Im trying to imbed many statements in a single awk statement. But it gives an error on that, for i in `less usage_types_dwh.txt` do cd /u01/app/evident/analysis_lab/usg_type grep $i svc_type.txt | head -1 | awk 'BEGIN {FS=","} {print $1 "==" $2 ":" $3 ":" $4;... (2 Replies)
Discussion started by: alishehzadpaul
2 Replies

4. Shell Programming and Scripting

Issue with AWK

I have this input file 0FB7,1083,Synchronized,FriNov121655,2816_7RAID5,05F:1_10F:1,10000000NoneNone,DC_db00p01 0FB7,1150,Split,MonApr180658,2816_7R5GC,N/A,N/A,N/A 06C4,0710,Synchronized,WedMar91105,2816_7RAID5,04E:1_11E:1,10000000NoneNone,DL_nb00p25... (1 Reply)
Discussion started by: greycells
1 Replies

5. Shell Programming and Scripting

awk NR issue

Hi guys, i am trying to analyze a text file using awk and am not able to solve this issue. This is the piece of code that I have written BEGIN { ## Time to count MACs -> 5 seconds. TIME_LIMIT = 5; k = 50000; } ## For every line. { time_in_seconds = $1... (2 Replies)
Discussion started by: jamie_123
2 Replies

6. Shell Programming and Scripting

AWK Issue

Hey, this is my code, cat $fulltrpath | while read line do inputfile=$(sed 1q $fulltrpath | awk '{ FS = "\t"; print $2$1}') outputpath=$(sed 1q $fulltrpath | awk '{ FS = "\t"; print $3 }') echo $inputfile echo $outputpath cp $inputfile $outputpath let path++ done if i... (1 Reply)
Discussion started by: inshafccna
1 Replies

7. Shell Programming and Scripting

issue trying to use awk

Hi Gurus, I am facing a similar issue usiung an awk command. Below is my requirement: ---DATA--- A;F;G A;D;E A;D;E B;Z;P C;Z;Q Expected: A F<TAB>G D<TAB>E D<TAB>E B D<TAB>E (1 Reply)
Discussion started by: rajangupta2387
1 Replies

8. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

9. Shell Programming and Scripting

awk - issue to get the right IP

On AIX 5.3 and AIX 6.1, I have this script for checking printers being pingable or not. for i in `lsallq` do echo "Queue Name: " $i echo "----------------------------------------" for j in `lsallqdev -q $i` do echo " Device Name:" $j hname=`echo... (3 Replies)
Discussion started by: Daniel Gate
3 Replies

10. UNIX for Dummies Questions & Answers

Help with awk issue

OK, so I am trying to use awk as a method of accessing a table stored in a file to then provide the capability of a look up table. The table is stored in a file named "/Users/jhaney/Desktop/assetTypeMapping.tsv" and looks like this: aCategory aLetter aNumber AssetCat1 A 123 ... (10 Replies)
Discussion started by: jhaneyzz
10 Replies
xfsinvutil(8)                                                 System Manager's Manual                                                xfsinvutil(8)

NAME
xfsinvutil - xfsdump inventory database checking and pruning utility SYNOPSIS
xfsinvutil [-F|-i] [-m media_label] -M mount_point mm/dd/yyyy xfsinvutil [-F|-i] [-m media_label] -u UUID mm/dd/yyyy xfsinvutil [-F] -s SESSION_ID xfsinvutil -i xfsinvutil -C DESCRIPTION
xfsdump maintains an online dump inventory in /var/lib/xfsdump/inventory. The -I option of xfsdump displays the inventory contents hierar- chically. The levels of the hierarchy are: filesystem, dump session, stream, and media file. xfsinvutil is a utility to check this inventory database for consistency, to remove entries of dump sessions which may no longer be of rel- evance, and to browse the contents of the inventory. The following command line options are available: -F Don't prompt the operator. When xfsinvutil encounters a matching dump session, xfsinvutil will normally ask the operator for permis- sion to delete the entry. With this option the deletion is performed, no questions asked. -i Interactive mode. Causes xfsinvutil to run in a mode that will allow the operator to browse and modify the contents of the inventory. Please refer to the Interactive Mode section below for more information. -M mount_point mm/dd/yyyy Prunes dump sessions identified by the given mount point which were created prior to the specified date. Optionally -m may be be spec- ified to further limit the matching dump sessions by media label. xfsinvutil will prompt the operator prior to pruning a dump session unless the -F or -i options are given. -u UUID mm/dd/yyyy Like -M, except the matching filesystem is specified using its universally unique identifier (UUID) instead of its mount point. -m media_label If specified, only sessions with at least one media file whose label matches this value will be eligible for pruning. This restric- tion is in addition to those imposed by the date and the -M or -u options. This option allows the pruning of all inventory references to media which may have been overwritten or lost. Note that this option does not apply to sessions with no media files. -s SESSION_ID Prunes the dump session identified by the given session id. xfsinvutil will prompt the operator prior to pruning a dump session unless the -F option is given. -C With this option, xfsinvutil performs consistency checks for all entries in the inventory database. It fixes any problems found. If no consistent entries are found , the corresponding inventory database file is removed. Interactive Mode When run with -i, xfsinvutil will present the operator with a hierarchical representation of the xfsdump inventory. In this mode, the operator can use the arrow keys (or the h j k l keys) to navigate the inventory and also use the following keys and functionality: + Expand a branch of the tree. - Collapse a branch of the tree. * Fully expand a branch of the tree. % Fully collapse a branch of the tree. h Move selection to the parent entry. l Move selection to the child entry. j Move selection to next entry. k Move selection to previous entry. d Mark the current record, and all sub-records, to be deleted. u Clear the current record and all parent records from being deleted. i Import another xfsdump inventory. ? Show help window. x Commit any changes made to the inventory, and exit the program. q Exit the program without committing any changes to the inventory. Inventories from other hosts can be imported to create a larger common inventory. It is recommended that the contents of /var/lib/xfs- dump/inventory on the remote host be copied to a temporary local directory prior to running xfsinvutil. When xfsinvutil is run in interac- tive mode, and the operator hits i, they will be prompted for the path to the inventory to be imported. xfsinvutil will then add the con- tents of the imported inventory to the main window, and all entries will be marked as imported. The operator can then delete any of these entries that are not to be imported. When the operator commits the changes, xfsinvutil will import any entries which were not marked as deleted. Deleted entries are not actually deleted from the original imported inventory. NOTES
Inventory Each dump session updates an inventory database in /var/lib/xfsdump/inventory. xfsdump uses the inventory to determine the base of incre- mental and resumed dumps. This database can be displayed by invoking xfsdump with the -I option. The display uses tabbed indentation to present the inventory hier- archically. The first level is filesystem. The second level is session. The third level is media stream (currently only one stream is supported). The fourth level lists the media files sequentially composing the stream. FILES
/var/lib/xfsdump/inventory dump inventory database SEE ALSO
xfsdump(8), xfsrestore(8). xfsinvutil(8)
All times are GMT -4. The time now is 09:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy