Sponsored Content
Full Discussion: AWK filter
Top Forums Shell Programming and Scripting AWK filter Post 302472775 by Scrutinizer on Thursday 18th of November 2010 04:43:32 AM
Old 11-18-2010
Code:
ls -lrdt filename* | awk -F- '{p=$NF}END{print p}'

---------- Post updated at 10:43 ---------- Previous update was at 10:42 ----------

Quote:
Originally Posted by Franklin52
Code:
ls -lt filename* | awk -F- 'NR==1{print $NF}'

Morning Smilie Smilie

Last edited by Scrutinizer; 11-18-2010 at 05:49 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Filter using awk

Hi, I need to filter the output of a command and display omitting the first 6 lines and the last two lines..How can i do this using awk. command | awk ' NR > 7' will omitt the first 6 lines but dont know how to omit the last two lines.. can anyone help? (3 Replies)
Discussion started by: arun_st
3 Replies

2. Shell Programming and Scripting

Filter values by Awk

INPUT A EEEE A EEEE A EEEE B FFFF B GGGG B FFFF C GGGG C FFFF C FFFF D HHHH D XXXX D YYYY D YYYY E EEEEE E EEEEE E EEEEE (5 Replies)
Discussion started by: repinementer
5 Replies

3. Shell Programming and Scripting

awk: assign variable with -v didn't work in awk filter

I want to filter 2nd column = 2 using awk $ cat t 1 2 2 4 $ VAR=2 #variable worked in print $ cat t | awk -v ID=$VAR ' { print ID}' 2 2 # but variable didn't work in awk filter $ cat t | awk -v ID=$VAR '$2~/ID/ { print $0}' (2 Replies)
Discussion started by: honglus
2 Replies

4. Shell Programming and Scripting

awk-filter record by another file

I have file1 3049 3138 4672 22631 45324 112382 121240 125470 130289 186128 193996 194002 202776 228002 253221 273523 284601 284605 641858 (8 Replies)
Discussion started by: biomed
8 Replies

5. Shell Programming and Scripting

Help with awk, using a file to filter another one

I have a main file: ... 17,466971 0,095185 17,562156 id 676 17,466971 0,096694 17,563665 id 677 17,466971 0,09816 17,565131 id 678 17,466971 0,099625 17,566596 id 679 17,466971 0,101091 17,568062 id 680 17,466971 0,016175 17,483146 id... (4 Replies)
Discussion started by: boblix
4 Replies

6. Shell Programming and Scripting

Filter column using awk

Hi all: How do I use an `awk` like: awk '{print $1 "\t" $2}' input on the following input: <head>medium-n</head> nmod+ns+ns-map-n <head>future-n</head> of+n-the+ns-map-n to achieve the following desired output: medium-n nmod+ns+ns-map-n future-n of+n-the+ns-map-n (3 Replies)
Discussion started by: owwow14
3 Replies

7. Shell Programming and Scripting

Use of awk to filter out the command output

Hi All, I am trying to find out number of cores present for hp-ux server from the output of print_manifest (as shown below). i suppose awk will be best tool to use for filtering. output of print_manifest is : System Hardware Model: ia64 hp Integrity Virtual Partition ... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

8. Shell Programming and Scripting

Use of awk or sed to filter out the ouput

Hi, i am trying to get the system model with the help of awk : $ prtconf | awk '/^System Model/' System Model: IBM,8408-E8D but i want just the below outout that is command should chk for pattern <IBM,> and remove it from the final output : System Model:8408-E8D Can... (2 Replies)
Discussion started by: omkar.jadhav
2 Replies

9. Shell Programming and Scripting

Filter and sort the file using awk

I have file and process it and provide clean output. input file Device Symmetrix Name : 000A4 Device Symmetrix Name : 000A5 Device Symmetrix Name : 000A6 Device Symmetrix Name : 000A7 Device Symmetrix Name : 000A8 Device Symmetrix Name : 000A9 Device Symmetrix Name ... (10 Replies)
Discussion started by: ranjancom2000
10 Replies

10. Shell Programming and Scripting

Filter using awk in CSV files

Hello Gentlemen, Finding difficulties to play with my Input files:confused: . Your guidance will certainly help as always. After converting to csv file from XLSM file, I am getting some extra ""(double quote) characters which I want to terminate inside shell script and process it further. ... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies
GPIV_HDF2PIV(1) 					      General Commands Manual						   GPIV_HDF2PIV(1)

NAME
gpiv_hdf2piv - Converts HDF5 PIV-data to ASCII data. SYNOPSIS
gpiv_hdf2piv [-e] [-h | --help] [-p | --print] [-v | --version] filename DESCRIPTION
gpiv_hdf2piv converts a HDF5 formatted file filename.hdf, containing PIV-data, PIV derived data, like vorticities, strain etc to (ASCII formatted) filename.piv., filename.vor, filename.sstr, filename.nstr and, eventually, image(s) to (PNG formatted) filename.png files. The parameters that have been used for the analysis and post processing are written to filename.par This program does not use the parameter resources from libgpiv. The parameters may be defined by the command line options as explained below. Options -e Exclude PIV data and data from post-processes. Only convert image data. -h | --help On-line help. -p | --print Prints parameters, command line options and input and output filenames to stdout. The output may be used as parameters of fasty for future use by re-directing stdout to fasty.par. -v | --version Print version information on standard output, then exits successfully. filename Full input file name, hdf formatted (including .hdf extension) SEE ALSO gpivtools AUTHOR
Gerber Van der Graaf 19 Januari 2005 GPIV_HDF2PIV(1)
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy