Sponsored Content
Top Forums Shell Programming and Scripting gets all files details committed to svn by a particular user [or all users] since a particular date Post 302584164 by itkamaraj on Thursday 22nd of December 2011 10:06:05 AM
Old 12-22-2011
@linuxadmin,

Thanks for sharing the script.

Some of the changes you need to do for the script.


Code:
Dont use cat and awk together


cat $svnfile_log_all | awk -v uName=$uName '/^r[0-9]+ / {user=$3} /./ {print user} '

change it to

awk -v uName=$uName '/^r[0-9]+ / {user=$3} /./ {print user} ' $svnfile_log_all



Code:
dont use cat and grep

cat $PROJECT/.svn/entries | grep "http://"

change it to

grep "http://" $PROJECT/.svn/entries

Code:
cat, grep , wc --- you can do it by grep -c

`cat $svnfile_log_all | grep "$uName" | wc -l`

change it to

grep -c $uName $svnfile_log_all


Code:
|sort | uniq 

change it to

sort -u

Code:
cat $PROJECT/.svn/entries | grep "http://" | head -1

change it to

awk  '/http:\/\// {print; exit}'  $PROJECT/.svn/entries

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Selecting files between a user inputed date range

Hi all! I'm working on a KSH script to select files between a user inputed date range (stored in a variable) and then move them and unzip them. I'm stuck at how to get the files between the user inputed date range selected. Any help would be greatly appreciated! The files are as such: ... (6 Replies)
Discussion started by: kelldan
6 Replies

2. Solaris

user logon details

how can i identifying whose are logged in last few days,time and date also want. what i will do for get that information (2 Replies)
Discussion started by: sijocg
2 Replies

3. Shell Programming and Scripting

SVN activity of certain user

Hi there, I'm looking for some help to get a little script done that shows me (or counts) only the added lines from an SVN repository of one specific user. Anybody has an idea? Thanks, Michael (0 Replies)
Discussion started by: MichaelGiese
0 Replies

4. Solaris

Command History for a user with IP details

Hi We are sharing our envoirnment with our component teams. the plateform is SunOS 5.8 Generic_117350-41 sun4u sparc SUNW,Sun-Fire-V490. All team logs in the domain with same user and perform activities. Now for the system auditing purpose can somebody guide me how can I get the details when... (6 Replies)
Discussion started by: sukhvinder_Tm
6 Replies

5. UNIX and Linux Applications

SVN user permissions trouble

I am trying to add a user to my SVN server that can only access one of about a dozen repositories I have set up. Here are the files that I think need changed and what I have set them to. No matter what I try with these files I am unable to see the results I am after. In the end I want this new... (0 Replies)
Discussion started by: benn600
0 Replies

6. Solaris

How to integrate SVN client to SVN server repository.

Hi, I am new to SVN configuration on Solaris 10.I have installed SVN client version 1.7. bash-3.00# ./svn --version svn, version 1.7.4 (r1295709) compiled Mar 2 2012, 12:59:36 Here my requirement is how to integrate svn client to One of the SVN server repository. My repository... (0 Replies)
Discussion started by: muraliinfy04
0 Replies

7. Shell Programming and Scripting

To get the files in a directory for the given date (User entered date)

Need a ksh script to get the files that were created or modified in a directory on a particular date entered by the user. For example if a directory contains files as below : > ll total 41 -rw-rw-r-- 1 psn psn 199 Aug 23 07:06 psn_roll.sh -rw-rw-r-- 1 psn psn ... (10 Replies)
Discussion started by: ramprabhum
10 Replies

8. Shell Programming and Scripting

History of all the users in single file with command , date . time , ip and user

HTML Code archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (2 Replies)
Discussion started by: rehantayyab82
2 Replies

9. Shell Programming and Scripting

History of all the users in single file with command , date . time , ip and user

HTML Code: archive_history() { HISTORYOLD=${HISTFILE}.archive CURTIME=`date` CURTTY=`tty` IP=$(echo $SSH_CLIENT | awk '{print $1}') if ; then echo "#-${HOSTNAME}-- ${CURBASHDATE} - ${CURTIME} ($CURTTY) ${USER} ${IP}----" >> $HISTORYOLD history... (0 Replies)
Discussion started by: rehantayyab82
0 Replies

10. Shell Programming and Scripting

Making post down hook script for svn regarding sending emails after an file is committed in svn

Hi Folks , I am asking this question but i apologise please if this is not the correct forum , I have to develop a shell script that i want to place in at hooks/post-commit , that is basically i have to develop a post hook script and the main functionality of that script would be lets say if... (0 Replies)
Discussion started by: sunsun06060606
0 Replies
COMMIT 
PREPARED(7) PostgreSQL 9.2.7 Documentation COMMIT PREPARED(7) NAME
COMMIT_PREPARED - commit a transaction that was earlier prepared for two-phase commit SYNOPSIS
COMMIT PREPARED transaction_id DESCRIPTION
COMMIT PREPARED commits a transaction that is in prepared state. PARAMETERS
transaction_id The transaction identifier of the transaction that is to be committed. NOTES
To commit a prepared transaction, you must be either the same user that executed the transaction originally, or a superuser. But you do not have to be in the same session that executed the transaction. This command cannot be executed inside a transaction block. The prepared transaction is committed immediately. All currently available prepared transactions are listed in the pg_prepared_xacts system view. EXAMPLES
Commit the transaction identified by the transaction identifier foobar: COMMIT PREPARED 'foobar'; COMPATIBILITY
COMMIT PREPARED is a PostgreSQL extension. It is intended for use by external transaction management systems, some of which are covered by standards (such as X/Open XA), but the SQL side of those systems is not standardized. SEE ALSO
PREPARE TRANSACTION (PREPARE_TRANSACTION(7)), ROLLBACK PREPARED (ROLLBACK_PREPARED(7)) PostgreSQL 9.2.7 2014-02-17 COMMIT PREPARED(7)
All times are GMT -4. The time now is 09:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy