10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi Guys
I am looking for a solution to one problem to remove parentheses in a range of lines.
Input file
module bist_logic_inst(a, ab , dhd, dhdh , djdj, hdh, djjd, jdj, dhd, dhp, dk
);
input a;
input ab;
input dhd;
input djdj;
input dhd;
output hdh;
output djjd;
output jdj;... (5 Replies)
Discussion started by: kshitij
5 Replies
2. Shell Programming and Scripting
data.txt:
hellohellohello
mellomello1mello
tellotellotellotello
bellobellowbellow
vellow
My attempts:
egrep ".*mello1\n.*bellow" data.txt
awk '/.*mello1.*\nbellow/' data.txt
how can i search for patterns that are on different lines using simple egrep or awk?
i only want the... (7 Replies)
Discussion started by: SkySmart
7 Replies
3. Shell Programming and Scripting
Hi,
I am using the following code to fetch lines that are generated in last 1 hr . Hence, I am using date function to calculate -last 1 hr & the current hr and then somehow use awk (or sed-if someone could guide me better)
with some regex pattern.
dt_1=`date +%h" "%d", "%Y\ %l -d "1 hour... (10 Replies)
Discussion started by: sarah-alikhan31
10 Replies
4. Shell Programming and Scripting
I have a large file of many pairs of sequences and their headers, which always begin with '>'
I'm looking for help on how to retain only sequences (and their headers) below a certain length. So if min length was 10, output would be
I can filter by length, but I'm not sure how to exclude... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
5. Shell Programming and Scripting
Hello,
I need an awk command to print only the lines that match regex on xth field from file.
For example if I use this command
awk -F"|" ' $22 == "20130117090000.*" 'It wont work, I think, because single quotes wont allow the usage of the metacharacter star * . On the other hand I dont know... (2 Replies)
Discussion started by: black_fender
2 Replies
6. Shell Programming and Scripting
Hello,
I try to script something (bash-script) and can not find a way to get and store a match into a variable from a line in a file. grep isn't useful as the matches are not returned - just colored. I can't get 'expr' to work for me. Is it necessary to use a perl-script with regex instead?
... (7 Replies)
Discussion started by: daWonderer
7 Replies
7. Shell Programming and Scripting
Hi everyone,
Fist of all I must confess that I am pretty new in the Unix environment and especially to shell scripting, however due to work related requirements I have started to analyze software specific logs.
The logs are structured so that it records by sessionID AND/OR Thread number, the... (3 Replies)
Discussion started by: sushimatt
3 Replies
8. Shell Programming and Scripting
I need a way to extract data from
X 4T Solution 21 OCT 2011 37 .00
to account 12345678 User1 user2
X 4T Solution Solution Unlimited 11 Sep 2009 248 .00
to account 87654321 user3 user4
I need it to extract 'X' '37.00' and account number 12345678.
I have extracted above stuff... (3 Replies)
Discussion started by: chakrapani
3 Replies
9. Shell Programming and Scripting
Hello,
I need to print four lines inmediatly after the regexp, but not the line containing the regexp. The print should show the four lines together in one.
Thanks! (13 Replies)
Discussion started by: auratus42
13 Replies
10. Shell Programming and Scripting
Hi all,
I need help regarding the following:
I need to support text search (number of text occurrences), in user specified
- text file and
- 'REGULAR EXPRESSION'.
>grep -c 'pattern' fileToSearch
was working successfully until I was requested to SUPPORT "\n"(new line separator in user... (1 Reply)
Discussion started by: epro
1 Replies