09-28-2015
Thanks for your reply but i would like to delete the line that has the matching string and then replace the line with new string.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Discussion started by: kkraja
6 Replies
2. Shell Programming and Scripting
Hi All,
I have a file from Mainframe which has one of the lines with so many words... i tried to fold, format to 80 chararcter.. stil did not work. So i have decided to search for a string in that line Ex.FLIGHT PLAN and once if it is found i want to delete the entire line.
Please help... (2 Replies)
Discussion started by: digitalrg
2 Replies
3. Shell Programming and Scripting
Hi Guys,
I am trying to write a perl script to search a string "Name" in the file "FILE" and also want to create a new file and push the searched string Name line along with 10 lines following the same.
can anyone of you please let me know how to go about it ? (8 Replies)
Discussion started by: sukrish
8 Replies
4. UNIX for Dummies Questions & Answers
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
Discussion started by: dashing201
4 Replies
5. Shell Programming and Scripting
Hi,
1_strings file contains
$ cat 1_strings
/home/$USER/Src
/home/Valid
/home/Review$ cat myxml
<projected value="some string" path="/home/$USER/Src">
<input 1/>
<estimate value/>
<somestring/>
</projected>
<few more lines >
<projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies
6. Shell Programming and Scripting
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies
7. Shell Programming and Scripting
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies
8. Shell Programming and Scripting
Hi,
Need your help for this scripting issue I have. I am not really good at this, so seeking your help.
I have a file looking similar to this:
Hello, i am human and name=ABCD.
How are you?
Hello, i am human and name=PQRS.
I am good.
Hello, i am human and name=ABCD.
Good bye.
Hello, i... (12 Replies)
Discussion started by: royzlife
12 Replies
9. UNIX for Beginners Questions & Answers
Hi,
I have a working script.
It does what I am intending it to but a bit confused whether the sed part is supposed to be working or not. Further down is the script with the sed part that should have been working but not and the grep -v part which is the workaround that I am using at the... (10 Replies)
Discussion started by: newbie_01
10 Replies
10. UNIX for Beginners Questions & Answers
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT DEBIAN
nl-qdisc-add
nl-qdisc(8) System Manager's Manual nl-qdisc(8)
NAME
nl-qdisc-{add|list|delete} - Manage queueing disciplines
SYNOPSIS
nl-qdisc-add --dev dev --parent id [OPTIONS] qdisc-type [QDISC]
nl-qdisc-delete [ --interactive ] [OPTIONS]
nl-qdisc-list [OPTIONS]
DESCRIPTION
The nl-qdisc tools allow to manage and configure queueing disciplines (qdiscs) in the kernel.
OPTIONS
-h or --help
Print help text to console and exit.
-v or --version
Print versioning information to console and exit.
-q or --quiet
Do not print informal notifications about actions taken to the console. By default a short description of each qdisc
added/update/deleted will be printed to the console. This option disables this behaviour.
-d or --dev=DEV
Network device the qdisc is attached to.
-p or --parent=ID
Identifier of the parent qdisc/class this qdisc is attached to. The identifier can be specified as classid, name or one of the spe-
cial values "root" or "ingress".
-i or --id=ID
Identifier of qdisc. It can be specified as classid or name.
nl-qdisc-add Options
--update
Update qdisc if it already exists, otherwise attempting to add a qdisc which already exists will result in an error. This does not
include changing the type of the qdisc, use --replace if you wish to do so.
--replace
Replace or update qdisc if it already exists. Same behaviour as --update but will completely replace the qdisc if it exists already.
--update-only
Update an existing qdisc but do not create it if it does not exist.
--replace-only
Update or replace an existing qdisc but do not create it if it does exist.
nl-qdisc-delete Options
--interactive
The interactive mode requires confirmation by the user for each qdisc deleted. It will print a prompt for each qdisc matching the
provided filter and requires the user to answer 'y'es or 'n'o.
--yes Make the default answer for interactive prompts be 'y'es. This option is also required to delete all qdiscs on all network devices.
-k or --kind=TYPE
Only delete qdiscs of this type.
nl-qdisc-list Options
--details
Show detailed information for each qdisc listed.
--stats
Show statistics information for each qdisc listed. This option will also turn on detailed information automatically.
-r or --recursive
List all TC objects recurisvely attached to all qdiscs matching the filter.
-k or --kind=TYPE
Only list qdiscs of this type.
USAGE
Add a HTB root qdisc with id "5:":
nl-qdisc-add --dev eth0 --parent root --id 5: htb
List all qdiscs on eth0 and print statistical data:
nl-qdisc-list --stats --dev eth0
Delete the qdisc "5:":
nl-qdisc-delete --id 5:
SEE ALSO
nl-classid-lookup(8)
AUTHOR
Thomas Graf is the original author and current maintainer of libnl and libnl tools. Many people have contributed to it since.
libnl 21 October 2010 nl-qdisc(8)