9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi all. So, first of all my apologies for the noob question. I've searched around for a way to make use of bash arrays to perform what I need, but I'm struggling to understand which method would be better.
So, I'm looking to get a bit more comfortable with scripting, hoping to use... (1 Reply)
Discussion started by: Techbart
1 Replies
2. Shell Programming and Scripting
I've a file like this
{multi line
.......
.......
pattern}
{
some other stuff
.........
}
{multi line
.......
.......
pattern}
{
some other stuff
.........
}
and so on (2 Replies)
Discussion started by: aamir_raihan
2 Replies
3. Shell Programming and Scripting
Dear Unix Forums,
I am hoping you can help me with a pattern matching problem.
What am I trying to do?
I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
Discussion started by: thefang
10 Replies
4. Shell Programming and Scripting
Hi,
I have a log file which has sessionids in it, each block in the log starts with a date entry, a block may be a single line or multiple lines. I need to sed (or awk) out the lines/blocks with that start with a date and include the session id.
The files are large at several Gb.
My... (3 Replies)
Discussion started by: andyatit
3 Replies
5. Shell Programming and Scripting
Hi,
I have a problem where I need to make this input:
nameRow1a,text1a,text2a,floatValue1a,FloatValue2a,...,floatValue140a
nameRow1b,text1b,text2b,floatValue1b,FloatValue2b,...,floatValue140b
look like this output:
nameRow1a,text1b,text2a,(floatValue1a - floatValue1b),(floatValue2a -... (4 Replies)
Discussion started by: nricardo
4 Replies
6. Shell Programming and Scripting
I have a file with data records separated by multiple equals signs, as below.
==========
RECORD 1
==========
RECORD 2
DATA LINE
==========
RECORD 3
==========
RECORD 4
DATA LINE
==========
RECORD 5
DATA LINE
==========
I need to filter out all data from this file where the... (2 Replies)
Discussion started by: Finja
2 Replies
7. Shell Programming and Scripting
Hi,
I have a file with text like this
.SET WIDTH 10000
.SET MAXERROR 1
insert into new_db
SELECT
*
FROM
some_db
;
+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+-
.SET WIDTH 10000... (3 Replies)
Discussion started by: sol_nov
3 Replies
8. Shell Programming and Scripting
Hello All,
I am here again scratching my head on pattern selection with special characters.
I have a large file having around 200 entries and i have to select a single line based on a pattern.
I am able to do that:
Code:
cat mytest.txt | awk -F: '/myregex/ { print $2}'
... (6 Replies)
Discussion started by: usha rao
6 Replies
9. UNIX for Advanced & Expert Users
Hi all, I need to category the processes in my system with awk. And for now, there are several command with similar name, so i have to match more than one pattern to pick it out. for instance:
binrundb
the string1, 2 & 3 may contain word, number, blank or "/". The "bin" should be ahead "rundb"... (5 Replies)
Discussion started by: sleepy_11
5 Replies