Sponsored Content
Top Forums Shell Programming and Scripting Grep command to search pattern corresponding to input from user Post 302995193 by Preeti Chandra on Monday 3rd of April 2017 04:55:51 AM
Old 04-03-2017
this command output is -
Code:
    "scan_out[5]" : output;      ## pinName = scan_out[5];  tf =  SO  ; 
    "COS_12_TM_4" [ 
    "scan_out[5]" := output [ 0ns:X, 50.000000ns:Q, 100.000000ns:X ];

I have other 3 matches of scan_out in my input file.
Can you explain the command
Code:
awk '{x=$0; sub(/".*"/,"",x)} (index(x,"[")) {sn=$0} (index(x,"]") && index($0,search)) {print sn}' search='scan_out[5]' file

.

what exactly it is doing?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

search pattern by grep

hai folks, i am vijay very new to this website. My query: Search patterns from root directory to all directories by using grep (3 Replies)
Discussion started by: vijaysabari
3 Replies

2. Shell Programming and Scripting

How to assign the Pattern Search string as Input Variable

guys, I need to know how to assing pattern matched string as an input command variable. Here it goes' My script is something like this. ./routing.sh <Server> <enable|disable> ## This Script takes an input <Server> variable from this line of the script ## echo $1 | egrep... (1 Reply)
Discussion started by: raghunsi
1 Replies

3. Shell Programming and Scripting

search for a pattern using grep

Hi I am facing the below problem. I have set of lines in which i have to search for only the line which matches with the pattren "/" only. input:- /*+ some text */ /*+ some text */ /* Remove rows from a table of survey results. */ /* Add a survey respondent's name and answers. */ /*... (7 Replies)
Discussion started by: manasa_vs
7 Replies

4. Shell Programming and Scripting

Pattern search using grep command !

Hi, I am trying to do pattern search using grep command. But i donot know what mistake i'm doing. I am not getting the expected Result. could any one please help me out? $ cat b.ksh AasdjfhB 57834B 86234B 472346B I want to print the line which is starting with either A or 8 and... (10 Replies)
Discussion started by: nikesh29
10 Replies

5. Shell Programming and Scripting

Grep command is not search the complete pattern

I am facing a problem while using the grep command in shell script. Actually I have one file (PCF_STARHUB_20130625_1) which contain below records. SH_5.55916.00.00.100029_20130601_0001_NUC.csv.gz|438|3556691115 SH_5.55916.00.00.100029_20130601_0001_Summary.csv.gz|275|3919504621 ... (2 Replies)
Discussion started by: sumit.vedi1988
2 Replies

6. UNIX for Advanced & Expert Users

Pattern Search with grep

Hello, I have a bunch of zip files like SS_SAMPLE_101_123.zip SS_101_123.zip SS_SAMPLE_121_345.zip SS_SAMPLE_222_678.zip SS_123_890.zip SS_.zip The 'ls' should search and list the files such as SS_101_123.zip and SS_123_890.zip alone. Could you please guide me with this.... (5 Replies)
Discussion started by: tinufarid
5 Replies

7. Shell Programming and Scripting

Search file pattern using grep command

I 'm writing a script to search particular strings from log files. The log file contains lines start with *. The file may contain many other lines start with *. I need to search a particular line from my log file. The grep command is working in command line , but when i run my script, Its printing... (7 Replies)
Discussion started by: vinus
7 Replies

8. UNIX for Beginners Questions & Answers

Reducing input file size after pattern search

I have a very large file with millions of entries identified by @M. I am using the following script to "extract" entries based on specific strings/patterns: #!/bin/bash if ] then file=$1 else echo "Input_file passed as an argument $1 is NOT found." exit; fi MID=(NULL "string-1"... (10 Replies)
Discussion started by: Xterra
10 Replies

9. Shell Programming and Scripting

awk command to search based on 5 user input fields

Field1=”” Field2=”” Field3=”” Field4=”” Field5=”” USER INPUT UP TO 5 FIELDS awk -F , '{ if ( $3 == Field1 && $6 == Field2 && $8 == Field3 && $9 == Field4 && $10 == Field5) print $0 }' /tmp/rodney.outD INPUT FILE (Rodney.outD): ... (3 Replies)
Discussion started by: rmerrird
3 Replies

10. UNIX for Beginners Questions & Answers

Grep/awk using a begin search pattern and end search pattern

I have this fileA TEST FILE ABC this file contains ABC; TEST FILE DGHT this file contains DGHT; TEST FILE 123 this file contains ABC, this file contains DEF, this file contains XYZ, this file contains KLM ; I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
SCAPIN(1)						     CAO-VLSI Reference Manual							 SCAPIN(1)

NAME
scapin - Scan path insertion ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in Paris, France. Web : http://asim.lip6.fr/recherche/alliance/ E-mail : alliance-users@asim.lip6.fr SYNOPSIS
scapin [-VRB] [-P file] Input_name Path_name Output_name DESCRIPTION
SCAPIN is an automatic scan path generator for gate level netlists. SCAPIN inserts a scan path in the netlist Input_name and drives a new netlist Output_name. This scan path contains all registers specified in the file Path_name.path (see below for the exact syntax). SCAPIN adds also 3 new connectors in the netlist: scan_in, scan_out and scan_test in order to control the scan path. Eventually SCAPIN adds an output buffer before the output connector scan_out (option -B). ENVIRONMENT VARIABLES
MBK_WORK_LIB(1) indicates the path to the read/write directory for the session. MBK_IN_LO(1) indicates the input netlist file format. MBK_OUT_LO(1) indicates the output netlist file format. SCAPIN_PARAM_NAME indicates the location of a parameter file (with extention .scapin) containing the properties (ports name, models name etc ...) of all cells needed for the scan path insertion. (see below for the exact syntax) OPTIONS
-V Sets verbose mode on. Each step is displayed on the standard output. -R All registers of the scan path are replaced by an equivalent scannable register cell (called reg-mux). (With the default option a simple multiplexor is added just before all registers of the scan path). -B Adds an output buffer before the output connector scan_out. -P file Specifies a parameter file (with extention .scapin) containing the properties of all cells needed for the scan path insertion. (see below for the exact syntax) # Example of .scapin file BEGIN_MUX MUX_MODEL mx2_x2 MUX_SEL cmd MUX_INPUT_SEL i1 MUX_INPUT_NSEL i0 MUX_VDD vdd MUX_VSS vss MUX_OUTPUT q END_MUX BEGIN_REG REG_MODEL sff1_x4 REG_CLK ck REG_INPUT i REG_VDD vdd REG_VSS vss REG_OUTPUT q REG_MUX mx2_x2 REG_REG_MUX sff2_x4 END_REG BEGIN_REG_MUX REG_MUX_MODEL sff2_x4 REG_MUX_SEL cmd REG_MUX_INPUT_SEL i1 REG_MUX_INPUT_NSEL i0 REG_MUX_CLK ck REG_MUX_VDD vdd REG_MUX_VSS vss REG_MUX_OUTPUT q REG_MUX_MUX mx2_x2 REG_MUX_REG sff1_x4 END_REG_MUX BEGIN_BUF BUF_MODEL buf_x2 BUF_INPUT i BUF_VDD vdd BUF_VSS vss BUF_OUTPUT q END_BUF Path_name Specifies a parameter file (with extention .path) containing an ordered list of all instances (registers) of the scan path. It contains also the name of the 3 connectors scan_in, scan_out and scan_test. (see below for the exact syntax) # Example of .path file BEGIN_PATH_REG cs_0 cs_1 cs_2 END_PATH_REG BEGIN_CONNECTOR SCAN_IN scin SCAN_OUT scout SCAN_TEST test END_CONNECTOR SEE ALSO
MBK_IN_LO(1). MBK_OUT_LO(1). MBK_WORK_LIB(1). BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory. We need your feedback to improve documentation and tools. ASIM
/LIP6 Juin 29, 2000 SCAPIN(1)
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy