No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
i have a file a.txt which contains "ysm.set.ac4-qa.sds.audit add yinst setting yti. YTI_ HOST_OVERRIDE =qa-sav-midas-002.ysm.ac4.yahoo.com" I have variable STR which is dynamically assigned the value "HOST_OVERRIDE=qa-sav-midas-002.ysm.ac4.yahoo.com" I need to grep $STR on the file a.txt as `grep "$STR" a.txt ` But because of the spaces before =, the line is … |
|
A string variable taking any kind of string has a value "yjava_jboss.log4j_file_appender_pattern_layout='%d .//- %x %-5p [%c] %m%n' " at some point of time during execution. It is to greped on a file that contains with value. I used grep "$STR" <filename> ,where STR during execution takes value as shown above. … |