10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
Sure it's an easy one, but it drives me insane.
input ("|" separated):
1|A,B,C,A
2|A,D,D
3|A,B,B
I would like to count the occurence of each capital letters in $2 across the entire file, knowing that duplicates in each record count as 1.
I am trying to get this output... (5 Replies)
Discussion started by: beca123456
5 Replies
2. Shell Programming and Scripting
Hello
I have a configuration file and I want to extract a part of this configuration.
Example of configuration:
profile toto {
bla bla
blabla
}
conftest {
toto {
myarguements
}
I try to do a sed command:
sed -n '/'toto' {$/,/^}/p'
But the result is :
profile toto { (6 Replies)
Discussion started by: maverick31
6 Replies
3. UNIX for Dummies Questions & Answers
Hi guys,
I like to find the Line number of Nth Occurence of a Search string in a file.
If possible, if it will land the cursor to that particualar line will be great.
Cheers!! (3 Replies)
Discussion started by: mac4rfree
3 Replies
4. UNIX for Dummies Questions & Answers
Hi
I want to search for a specific pattern in file
Say
ABC;HELLO_UNIX_WORLD;PQR
ABC;HELLO_UNIX_WORLD_IS_NOT_ENOUGH;XYZ
ABC;HELLO_UNIX_FORUM;LMN
Pattern to search is : "HELLO_UNIX_*****" and not "HELLO_UNIX_***_***_"
I mean after "HELLO_UNIX" there can only be one word.In this case... (2 Replies)
Discussion started by: dashing201
2 Replies
5. Shell Programming and Scripting
Hi folks,
I have a file which contains several occurences of 2 different patterns. I need to find out the line of first occurence of pattern2 starting after the position of first occurence of pattern1.
example file:
aaaa
pattern2
bbbb
pattern1
ccc
pattern2
ddd
pattern1
eee
pattern2... (9 Replies)
Discussion started by: sameucho
9 Replies
6. Shell Programming and Scripting
hi,
is it possible to find the number of occurences of a pattern between two paranthesis.
for e.g
i have a file as below.
>>{
>>hi
>>GoodMorning
>>how are you?
>>}
>>is it good,
>>tell me yes, if it is good
In the above file, its clear the occurence of word "Good"... (17 Replies)
Discussion started by: divak
17 Replies
7. Shell Programming and Scripting
I have an array as follows:
Space: ABC
Name: def
Age: 22
Type: new
Name: fgh
Age: 34
Type: old
Space: XYZ
Name: pqr
Age: 44
Type: new
:
:
How can I separate the array with elements starting from Space:ABC until Space: XYZ & put them in a different array & so on... (4 Replies)
Discussion started by: deo_kaustubh
4 Replies
8. Shell Programming and Scripting
I need to extract the last block of /== START OF SQLPLUS ==/ and /== END OF SQLPLUS ==/. The logifle is written to several times in a day using >> to append. I need a solution using grep/sed.
logfile looks like this
START OF LOGFILE
/== START OF SQLPLUS ==/
ERROR
/== END OF SQLPLUS... (5 Replies)
Discussion started by: hanton
5 Replies
9. Shell Programming and Scripting
Greetings to All ... :b:
I have one root folder containing different other folders within it.
I need to get the list of all different types of file extensions residing in those folders.
Could anyone help me providing some shell script? (1 Reply)
Discussion started by: riverside
1 Replies
10. UNIX for Dummies Questions & Answers
Greetings,
I need to search and count all the occurences of a word in all the files in a directory.
Any suggestions greatly appreciated.
Thanks (1 Reply)
Discussion started by: skoppana
1 Replies