Hi,
I have a file which contains a word like ravi and ravi30.
i want to replace only the word ravi with xxx for that i am using the below sed command
sed -e 's/ravi/xxx/g' .
but the above command out put is xxx and xxx30 but i dont need to change ravi30
please guide me how to proceed.... (4 Replies)
All,
I have the following file:
--------------------------------------
#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services... (2 Replies)
Hi all,
if I have the following piece (repeating) of text within a file and I wish to delete it via sed
a
b
c
d
e
<tr>
<td><img alt="" height="1" width="3" src="/testweb/view/browser/images/shim.gif"></td><td><img alt="" height="1" ... (4 Replies)
Unfortunately this chap has been banned for some reason and I was looking forward to the resolution of his question: -
https://www.unix.com/shell-programming-scripting/123118-append-position-28-33-a.html
He was asking if you can use sed to match a pattern you want to replace within a... (6 Replies)
Hello All,
I have the following lines in a file
<address location="test"
ConnectionName="test" />
I want to replace the above lines by
<address location="test123" />
I am usind SED and not able to remove the new line characters between the two lines.
Can anyone please help... (4 Replies)
I have a bunch of conf files, that contain the fully qualified names of servers. I would like to be able to use some sort of pattern matching with sed or vi, or whatever, to pull out the fully qualified server names, and dump them in a file.
It just needs to work across several unix os. So, I... (4 Replies)
Hi,
i have data file like:
START1
a
b
STOP
c
d
START2
e
STOP
f
START3
g
STOP
When one of the START<count> variable is passed, i should print all lines matching this until the first 'STOP'
for example if 'START2' is provided for match, i should get the result as:
START2 (1 Reply)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
DROP TABLE(7) SQL Commands DROP TABLE(7)NAME
DROP TABLE - remove a table
SYNOPSIS
DROP TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]
DESCRIPTION
DROP TABLE removes tables from the database. Only its owner can drop a table. To empty a table of rows without destroying the table, use
DELETE [delete(7)] or TRUNCATE [truncate(7)].
DROP TABLE always removes any indexes, rules, triggers, and constraints that exist for the target table. However, to drop a table that is
referenced by a view or a foreign-key constraint of another table, CASCADE must be specified. (CASCADE will remove a dependent view
entirely, but in the foreign-key case it will only remove the foreign-key constraint, not the other table entirely.)
PARAMETERS
IF EXISTS
Do not throw an error if the table does not exist. A notice is issued in this case.
name The name (optionally schema-qualified) of the table to drop.
CASCADE
Automatically drop objects that depend on the table (such as views).
RESTRICT
Refuse to drop the table if any objects depend on it. This is the default.
EXAMPLES
To destroy two tables, films and distributors:
DROP TABLE films, distributors;
COMPATIBILITY
This command conforms to the SQL standard, except that the standard only allows one table to be dropped per command, and apart from the IF
EXISTS option, which is a PostgreSQL extension.
SEE ALSO
ALTER TABLE [alter_table(7)], CREATE TABLE [create_table(7)]
SQL - Language Statements 2010-05-14 DROP TABLE(7)