10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I am using UNix Sun OS sun4u sparc SUNW,SPARC-Enterprise
My intention is to insert a line of text after 13th line of every file inside a particular directory.
While trying to do it for a single file , i am using sed
sed '3 i this is the 4th line' filename
sed: command garbled: 3... (5 Replies)
Discussion started by: gotamp
5 Replies
2. UNIX for Dummies Questions & Answers
Hi Guys,
I am newbie here and greeting to all guys of unix forum, now I want to learn unix here.
I have query here, we have file where file has 20 line record, now i want display 10 to 15 line row record only, then how it possible. (5 Replies)
Discussion started by: aaditya321
5 Replies
3. Shell Programming and Scripting
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Discussion started by: JolietJake
2 Replies
4. UNIX for Advanced & Expert Users
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies
5. Shell Programming and Scripting
Hello.
I have a config file (/etc/my_config_file) which may content :
#
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
network_interface=eth0
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Discussion started by: jcdole
6 Replies
6. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--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
14 Replies
7. Shell Programming and Scripting
Hello,
I am looking to automate a task - which is updating an existing access control instruction of a server and making sure that the attributes defined in the instruction is in sorted order. The instructions will be of a specific syntax.
For example lets assume below listed is one of an... (6 Replies)
Discussion started by: sanjayroc
6 Replies
8. Shell Programming and Scripting
Hi,
I need to insert a new line containing the string "QUERY" above every 5 lines.
The below piece of code inserts a new line after every 5th line
awk '{print $0} !(NR%5) {print "QUERY"}'
sed 'n;n;n;n;G;' --> I do not know how to give "QUERY" string here
But I need to insert it before... (4 Replies)
Discussion started by: royalibrahim
4 Replies
9. Shell Programming and Scripting
Hi folks,
I've list of LDAP records in this format:
cat cmmac.export.tmp2
dn: deviceId=0a92746a54tbmd34b05758900131136a506,ou=devices,ou=customer,ou=nl,o=upc
cmmac: 00:13:11:36:a5:06
dn: deviceId=0a92746a62pbms4662299650015961cfa23,ou=devices,ou=customer,ou=nl,o=upc
cmmac:... (4 Replies)
Discussion started by: tomas.polak
4 Replies
10. UNIX for Advanced & Expert Users
Hello,
I need to insert a line (like a header) as the first line of a very huge file (about 3 ml rows). I am able to do it with sed, but redirecting the output and creating a new file takes quite some time. I was wondering if there was a more efficient way of doing it?
Any help would be... (3 Replies)
Discussion started by: shriek
3 Replies