Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
How would I accomplish this if I want to test to see if it
1) starts with a dash so something like "-R"
AND
2) starts with 1 character then either a "-" or "+" and then up to 3 characters such as "a+rx" (3 Replies)
We are getting extended Ascii characters in the input file and my requirement is to search and replace them with a space. I am using the following command
LANG=C sed -e 's// /g'
It is doing a good job, but in some cases it is replacing the extended characters with two spaces. So my input... (12 Replies)
1st_FILE.cnf
Here is my sample test file .
This will be replaced by .
2nd_FILE.cnf
This is my 2nd test file ..This is agian a test file for purpose.
variable.txt
TST_FILE=1st_FILE.txt
FILE_NAME=1st_FILE.txt
2ND_TST_FILE=2nd_FILE.txt
REASON=test
I have 2 sample config file under... (13 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
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 CENTOS
begin
BEGIN(7) PostgreSQL 9.2.7 Documentation BEGIN(7)NAME
BEGIN - start a transaction block
SYNOPSIS
BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ]
where transaction_mode is one of:
ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
READ WRITE | READ ONLY
[ NOT ] DEFERRABLE
DESCRIPTION
BEGIN initiates a transaction block, that is, all statements after a BEGIN command will be executed in a single transaction until an
explicit COMMIT(7) or ROLLBACK(7) is given. By default (without BEGIN), PostgreSQL executes transactions in "autocommit" mode, that is,
each statement is executed in its own transaction and a commit is implicitly performed at the end of the statement (if execution was
successful, otherwise a rollback is done).
Statements are executed more quickly in a transaction block, because transaction start/commit requires significant CPU and disk activity.
Execution of multiple statements inside a transaction is also useful to ensure consistency when making several related changes: other
sessions will be unable to see the intermediate states wherein not all the related updates have been done.
If the isolation level, read/write mode, or deferrable mode is specified, the new transaction has those characteristics, as if SET
TRANSACTION (SET_TRANSACTION(7)) was executed.
PARAMETERS
WORK, TRANSACTION
Optional key words. They have no effect.
Refer to SET TRANSACTION (SET_TRANSACTION(7)) for information on the meaning of the other parameters to this statement.
NOTES
START TRANSACTION (START_TRANSACTION(7)) has the same functionality as BEGIN.
Use COMMIT(7) or ROLLBACK(7) to terminate a transaction block.
Issuing BEGIN when already inside a transaction block will provoke a warning message. The state of the transaction is not affected. To nest
transactions within a transaction block, use savepoints (see SAVEPOINT(7)).
For reasons of backwards compatibility, the commas between successive transaction_modes can be omitted.
EXAMPLES
To begin a transaction block:
BEGIN;
COMPATIBILITY
BEGIN is a PostgreSQL language extension. It is equivalent to the SQL-standard command START TRANSACTION (START_TRANSACTION(7)), whose
reference page contains additional compatibility information.
The DEFERRABLE transaction_mode is a PostgreSQL language extension.
Incidentally, the BEGIN key word is used for a different purpose in embedded SQL. You are advised to be careful about the transaction
semantics when porting database applications.
SEE ALSO COMMIT(7), ROLLBACK(7), START TRANSACTION (START_TRANSACTION(7)), SAVEPOINT(7)PostgreSQL 9.2.7 2014-02-17 BEGIN(7)