10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Test file x.txt below. This file is generated by a program that I unfortunately do not have control on how it gets presented/generated.
create PACKAGE "XXX_INTERFACE_DEFECT_RPT_TEST" is
TYPE refCursor IS REF CURSOR;
Function queryRecords (
)... (4 Replies)
Discussion started by: newbie_01
2. Shell Programming and Scripting
Hi guys I am trying to figure out how to match a pattern with a regex up to a full blank line. I will show you what I mean with this example:
movie name: ted
movie name: TMNT
movie name: Jinxed
problem (8 Replies)
Discussion started by: acoding
3. Shell Programming and Scripting
I have a config file (/etc/my_config_file) which may content :
# port for HTTP (descriptions, SOAP, media transfer) traffic
# network interfaces to serve, comma delimited
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Discussion started by: jcdole
4. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
blah blah blah
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
5. Shell Programming and Scripting
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Discussion started by: deneuve01
6. Shell Programming and Scripting
I have a file which contains two entry with spaces (either one or more than one space). ex.
now I want to... (11 Replies)
Discussion started by: anshu ranjan
7. Shell Programming and Scripting
I've got a report I need to make easier to read Using sh on HP-UX 11.12.
In short, I want to search for a regular expression and when found, examine the next line to see if it's blank. If so, then delete both lines. If not blank, move on to the next regexp. Repeat.
So far I've got:
... (7 Replies)
Discussion started by: Scottie1954
8. Shell Programming and Scripting
I'm new to using sed and grep commands, but have found them extremely useful. However I am having a hard time figuring this one out:
Delete every line containing the word CEN and the next line as well.
to produce:... (2 Replies)
Discussion started by: rocketman88
9. Shell Programming and Scripting
I need to delete the last line only if its blank not otherwise. (3 Replies)
Discussion started by: dinjo_jo
10. Shell Programming and Scripting
I have a file which has the first blank line:
Is there a command to remove this first blank line? Thanks for help -A (4 Replies)
Discussion started by: aoussenko