10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
2. Shell Programming and Scripting
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
3. Shell Programming and Scripting
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
Discussion started by: tigerhills
4 Replies
4. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
5. Shell Programming and Scripting
Hi All,
From the below line if we want to display all the text till found pattern dot/. I was trying with the below code but couldn't able
to print text before the pattern. it display texts which is found after pattern.
awk '/assed/{print;getline;print}' file_name | sed 's/^*. *//'
input... (4 Replies)
Discussion started by: Optimus81
4 Replies
6. Shell Programming and Scripting
Hi,
I need to match lines after a pattern, upto the first blank line.
Searched in web and some forums but coulnt find the answer.
where <restart_step> =
10 -- Execute query
20 -- Write the contents to the Oracle table
30 -- Writing Contents to OUTPUT... (7 Replies)
Discussion started by: justchill
7 Replies
7. Shell Programming and Scripting
Hi I have the following Input
--
-- TABLE: BUSINESS_UNIT
--
ALTER TABLE RATINGS.BUSINESS_UNIT ADD CONSTRAINT FK1_BUSINESS_UNIT
FOREIGN KEY (PEOPLESOFT_CHART_FIELD_VALUE_ID)
REFERENCES RATINGS.PEOPLESOFT_CHART_FIELD_VALUE(PEOPLESOFT_CHART_FIELD_VALUE_ID)
;
ALTER TABLE... (1 Reply)
Discussion started by: pukars4u
1 Replies
8. Shell Programming and Scripting
i have a file in this pattern
MATCH1 word1 IMAGE word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH1 word1 IMAGE word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1... (7 Replies)
Discussion started by: bangaram
7 Replies
9. Shell Programming and Scripting
I have a file like this..
Maharastra Mumbai worli
Maharastra Mumbai navy
maharatra Pune
Maharastra Nagpur
Karnataka Bangalore
Karnataka Mysore
Karnataka Mangalore
Punjab Amritsar
punjab Jalandar
my expected outcome should be like this
Maharastra Mumbai worli
---------- ... (9 Replies)
Discussion started by: geeko
9 Replies
10. Shell Programming and Scripting
Hi All,
I want to remove first few characthers from starting of the line till ',' Comma... which needs to be done for all the lines in the file
Eg:
File content
1,"1234",emp1,1234
2,"2345",emp2,2345
Expected output is
,"1234",emp1,1234
,"2345",emp2,2345
How can parse... (4 Replies)
Discussion started by: kiranlalka
4 Replies