10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am looking for a solution to one problem to remove parentheses in a range of lines.
module bist_logic_inst(a, ab , dhd, dhdh , djdj, hdh, djjd, jdj, dhd, dhp, dk
output jdj;... (5 Replies)
Discussion started by: kshitij
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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. Shell Programming and Scripting
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
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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