Sponsored Content
Top Forums Shell Programming and Scripting Grep command to search pattern corresponding to input from user Post 302995201 by Preeti Chandra on Monday 3rd of April 2017 05:58:03 AM
Old 04-03-2017
Yes my input file is different .I try to point the area where scan_out[5] is present in my input file :

Code:
pattern MAIN ( "dft_jtag_sel", "dft_jtag_si", "dtm_global_rstb",  
               "DTM_VTRIM":I, "VDDA_1V8_DTM":I, "VDD_0V9":I, "VSS":I, 
               "scan_out[0]", "scan_out[10]", "scan_out[11]", "scan_out[12]", "scan_out[13]", "scan_out[14]", "scan_out[15]", "scan_out[1]", "scan_out[2]", "scan_out[3]", "scan_out[4]", "scan_out[5]", "scan_out[6]", "scan_out[7]", "scan_out[8]", "scan_out[9]", 
               "DTM_VTRIM":O, "VDDA_1V8_DTM":O, "VDD_0V9":O, "VSS":O )

Code:
"scan_out[15]" : output;      ## pinName = scan_out[15];  tf =  SO  ;  
    "scan_out[4]" : output;      ## pinName = scan_out[4];  tf =  SO  ; 
    "scan_out[5]" : output;      ## pinName = scan_out[5];  tf =  SO  ; 
    "scan_out[6]" : output;      ## pinName = scan_out[6];  tf =  SO  ;


Code:
 "scan_out[1]" := output [ 0ns:X, 50.000000ns:Q, 100.000000ns:X ]; 
    "scan_out[2]" := output [ 0ns:X, 50.000000ns:Q, 100.000000ns:X ]; 
    "scan_out[3]" := output [ 0ns:X, 50.000000ns:Q, 100.000000ns:X ]; 
    "scan_out[4]" := output [ 0ns:X, 50.000000ns:Q, 100.000000ns:X ]; 
    "scan_out[5]" := output [ 0ns:X, 50.000000ns:Q, 100.000000ns:X ]; 
    "scan_out[6]" := output [ 0ns:X, 50.000000ns:Q, 100.000000ns:X ];

Code:
 "scan_out[3]" : output;      ## pinName = scan_out[3];  tf =  SO  ; 
    "scan_out[4]" : output;      ## pinName = scan_out[4];  tf =  SO  ; 
    "scan_out[5]" : output;      ## pinName = scan_out[5];  tf =  SO  ; 
    "scan_out[6]" : output;      ## pinName = scan_out[6];  tf =  SO  ; 
    "scan_out[7]" : output;      ## pinName = scan_out[7];  tf =  SO  ;

Code:
Last same which i posted earlier as input file.

Code:
COS_12_TM_4" [ 
         "dummy_COS_12_1_TM_4",
         "dummy_COS_12_2_TM_4",
         "dummy_COS_12_3_TM_4",
         "dummy_COS_12_4_TM_4",
         "dummy_COS_12_5_TM_4",
         "dummy_COS_12_6_TM_4",
         "dummy_COS_12_7_TM_4",
         "dummy_COS_12_8_TM_4",
         "dummy_COS_12_9_TM_4",
         "dummy_COS_12_10_TM_4",
         "dummy_COS_12_11_TM_4",
         "dummy_COS_12_12_TM_4",
         "dummy_COS_12_13_TM_4",
         "dummy_COS_12_14_TM_4",
         "dummy_COS_12_15_TM_4",
         "dummy_COS_12_16_TM_4",
         "dummy_COS_12_17_TM_4",
         "dummy_COS_12_18_TM_4",
         "dummy_COS_12_19_TM_4",
         "dummy_COS_12_20_TM_4",
         "dummy_COS_12_21_TM_4",
         "dummy_COS_12_22_TM_4",
         "dummy_COS_12_23_TM_4",
         "dummy_COS_12_24_TM_4",
         "dummy_COS_12_25_TM_4",
         "dummy_COS_12_26_TM_4",
         "dummy_COS_12_27_TM_4",
         "dummy_COS_12_28_TM_4",
         "dummy_COS_12_29_TM_4",
         "dummy_COS_12_30_TM_4",
         "dummy_COS_12_31_TM_4",
         "dummy_COS_12_32_TM_4",
         "dummy_COS_12_33_TM_4",
         "dummy_COS_12_34_TM_4",
         "dummy_COS_12_35_TM_4",
         "dummy_COS_12_36_TM_4",
         "dummy_COS_12_37_TM_4",
         "dummy_COS_12_38_TM_4",
         "dummy_COS_12_39_TM_4",
         "dummy_COS_12_40_TM_4",
         "scan_out[5]" ];

Lastly I want output from the last part of the file.

---------- Post updated at 04:58 AM ---------- Previous update was at 04:46 AM ----------

Can you explain me your command?
I will try at my end.
 

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
All times are GMT -4. The time now is 10:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy