10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello masters,
I am filtering data based on completeness. A (Name , Group) combination in File2 is only complete when it has data for all subgroups specified in File1.
All incomplete (Name , Group) combinations do not appear in the output.
So for example , Name1 Group 1 in File2 is... (6 Replies)
Discussion started by: senhia83
6 Replies
2. Shell Programming and Scripting
Hello,
I have a file like this:
FILE.TXT:
(define argc :: int)
(assert ( > argc 1))
(assert ( = argc 1))
<check>
#
(define c :: float)
(assert ( > c 0))
(assert ( = c 0))
<check>
#
now, i want to separate each block('#' is the delimeter), make them separate files, and then send them as... (5 Replies)
Discussion started by: paramad
5 Replies
3. Shell Programming and Scripting
Hi,
I have an sqlplus output file using the character ';' as a delimiter and I would like to replace the fields without datas (i.e delimited by ';;') by ';0;'
Example: my sqlplus output:
11;22;33;44;;;77;;
What I would like to have:
11;22;33;44;0;0;77;0;
Thanks in advance for your... (2 Replies)
Discussion started by: popesk
2 Replies
4. Shell Programming and Scripting
Hi all,
I'm learning sed (and regular expressions) - My first little program is to replace 3 numbers in a row with 'XXX'
This is what I am trying:
echo '511' | sed 's/{3}/XXX/'
Here is the output:
defunct-macbook-pro:~ defunct$ echo '511' | sed 's/{3}/XXX/'
511For some reason, it doesnt... (2 Replies)
Discussion started by: Defunct
2 Replies
5. Shell Programming and Scripting
I have a text file and every line ends in
|^
|^^
|^^^
|^^^^
I need to use sed to make all lines end it
|^
regardless of the amount of carrots.
The code i was using is:
cat FILE | sed 's/\^\^\^/\^/g'
But then they threw that curveball at me. Also is there a way to... (2 Replies)
Discussion started by: insania
2 Replies
6. Shell Programming and Scripting
Hi All,
I have a dhcpd.conf file that gets static hosts added and removed via a shell script. After sometime, there becomes huge gaps of space ( blank lines ) between each host block. I tried a couple of sed one-liners; but, I can't seem to get the output I'm looking for. Also, I would like... (4 Replies)
Discussion started by: cstovall
4 Replies
7. UNIX for Dummies Questions & Answers
hi,
I need to write a command to look into a text file, find lines that contain patterns of three or more characters that repeat once, and put perenthesizes around them. so for example, the line "123test123" would be changed to "(123)test(123)" and "abcdeabcde" to "(abcde)(abcde)".
any hint is... (7 Replies)
Discussion started by: metalwarrior
7 Replies
8. UNIX for Advanced & Expert Users
hi,
I need to write a command with sed to find all the lines in a file that contain patterns of three or more characters that repeat once and put them inside perenthezes. I cannot tell sed what pattern to look for. it should find repeated patterns automatically.
example:... (1 Reply)
Discussion started by: metalwarrior
1 Replies
9. Shell Programming and Scripting
Hello,
Hello Firends,
I have file like below. I want to remove selected blocks say abc,pqr,lst. how can i remove those blocks from file.
zone abc {
blah
blah
blah }
zone xyz {
blah
blah
blah }
zone pqr {
blah
blah
blah } (4 Replies)
Discussion started by: nrbhole
4 Replies
10. Shell Programming and Scripting
Hi,
I tried this but could not get it...
here is what I need I have an xml where I get all the data in blocks but some times I get empty blocks with no data...shown below..I need to delete only those blocks with no data, I tried couple of ways but could not do it..any help is appreciated...... (1 Reply)
Discussion started by: mgirinath
1 Replies