Sponsored Content
Top Forums UNIX for Advanced & Expert Users Pass variable to awk command search string Post 302937037 by Scott on Monday 2nd of March 2015 06:37:48 PM
Old 03-02-2015
Can you close and reopen the awk around the variable?

Code:
gawk --re-interval '/^([ST].{3}P .{4}'$VAL'A.{8}1)/'  ${Arch_Dir}/${CYCLE}/${SUB_NAME} | wc -l

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

can I pass awk variable to system command?

I wanna use a system function to deal with several data. So I use awk variable FILENAME to transfer the file directory to system command, but it does not work. I use a shell function "out_function" to deal with data and save the result in another directory with the same file name. How can I... (2 Replies)
Discussion started by: zhynxn
2 Replies

2. Shell Programming and Scripting

how to pass variable in NR function used in awk command?

Hi I want to pass variables with the NR function in awk command. test_file1 is input file having 500 records. var1=100. var2=200 awk -F" " 'NR >= $var1 && NR <= $var2' test_file1 > test_file2. My end result should be that test_file2 should have records from line number between... (2 Replies)
Discussion started by: Nishithinfy
2 Replies

3. Shell Programming and Scripting

Awk command for search a string in lspv

I want to know wich hdisk have only one pvid and also display hdisk with two pvid. hdisk1 00c3fcd4e516183f testvg active hdisk2 00c3fcd4e516189b testvg active hdisk3 00c3fcd4e51618ec testvg ... (1 Reply)
Discussion started by: khalidou13
1 Replies

4. Shell Programming and Scripting

Awk command for search a string in lspv

I 've got this retourn when i tape the commande lspv: hdisk0 00c3fce454950416 rootvg active hdisk1 00c3fce454950416 rootvg active I want to verify if hdisk0 et hdisk1 have the same pvid (ex : 00c3fce454950416)? Can... (8 Replies)
Discussion started by: khalidou13
8 Replies

5. Shell Programming and Scripting

Search several string and convert into a single line for each search string using awk command AIX?.

I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios. Cat test Nov 10, 2012 5:17:53 AM INFO: Request Type Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies

6. Shell Programming and Scripting

Cannot pass rsh and awk command into a variable

Hello, I'm having some issues getting a home dir from a remote server passed to a variable. Here is what I have so far: rsh server "(ls -ld /home*/user | awk '{print \$9}')" /home3/userThat works fine and brings back what I need. But when I try to add it to a variable it goes all... (3 Replies)
Discussion started by: elcounto
3 Replies

7. Shell Programming and Scripting

Display Additional Variable string in awk print command

Hi all, I have script to monitor and sum up the total memory use up for each individual process. proc=$1 svmon -P -O summary=basic,unit=MB|awk 'NR>4'|grep -w "${proc}" |awk '{sum+=$3} END {printf "\t" sum """\n";}' But I would like the script to be able to display as following ... (3 Replies)
Discussion started by: ckwan
3 Replies

8. Shell Programming and Scripting

Pass column number as variable to awk and compare with a string.

Hi All, I have a file test.txt. Content of test.txt : 1 vinay se 2 kumar sse 4 kishore tl I am extracting the content of file with below command. awk '$2 ~ "vinay" {print $0}' test.txt Now instead of hardcoding $2 is there any way pass $2 as variable and compare with a... (7 Replies)
Discussion started by: Girish19
7 Replies

9. Shell Programming and Scripting

awk variable search and line count between variable-search pattern

Input: |Running the Rsync|Sun Oct 16 22:48:01 BST 2016 |End of the Rsync|Sun Oct 16 22:49:54 BST 2016 |Running the Rsync|Sun Oct 16 22:54:01 BST 2016 |End of the Rsync|Sun Oct 16 22:55:45 BST 2016 |Running the Rsync|Sun Oct 16 23:00:02 BST 2016 |End of the Rsync|Sun Oct 16 23:01:44 BST 2016... (4 Replies)
Discussion started by: busyboy
4 Replies

10. Shell Programming and Scripting

Search for string in column using variable: awk

I'm interested to match column pattern through awk using an external variable for data: -9 1:751343:T:A -9 0 T A 0.726 -5.408837e-03 9.576603e-03 7.967536e-01 5.722312e-01 -9 1:751756:T:C -9 0 T C 0.727 -5.360458e-03 9.579447e-03 7.966977e-01 5.757858e-01... (7 Replies)
Discussion started by: genome
7 Replies
gts2oogl(1)						  GNU Triangulated Surface utils					       gts2oogl(1)

NAME
gts2oogl - converts a GTS file to OOGL file format (Geomview). SYNOPSIS
gts2oogl [OPTIONS] < input.srf > output.oogl DESCRIPTION
This manual page documents briefly the gts2oogl command. OPTIONS
This program follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. -G, --gnuplot Writes isolines in gnuplot format. --component Color faces according to the component they belong too. --quality Color faces according to their quality. --area Color faces according to their area. --incomp Color incompatible faces. -f VAL, --fold=VAL Color faces which make an angle smaller than VAL degrees with any of their neighbors. -t, --faces Output individual faces. --epv Color vertices according to number of edges per vertex. -H C, --height=C Color vertices according to their C coordinate. -g, --gaussian Color vertices according to Gaussian curvature. -C, --curvature Color vertices according to mean curvature. --boundary Output boundary edges. -e A, --feature=A Output `feature' edges defined by angle A. --non-manifold Output non-manifold edges. --duplicate Output duplicate edges. -i N, --isolines=N Draw N isolines (levels of constant altitude). -I L, --isolines=L Draw isoline at level L. --cmap=FILE Load FILE as colormap. -m VAL, --min=VAL Use VAL as minimum scaling value. -M VAL, --max=VAL Use VAL as maximum scaling value. -r, --reverse Reverse colormap. -n, --nosurface Do not output surface. -F C, --flatten=C Set C coordinate to average value. -v, --verbose Display surface statistics. -h, --help Display the help and exit. AUTHOR
gts2oogl was written by Stephane Pipinet <popinet@users.sourceforge.net>. This manual page was written by Ruben Molina <rmolina@udea.edu.co>, for the Debian project (but may be used by others). June 2, 2008 gts2oogl(1)
All times are GMT -4. The time now is 02:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy