I was able to do this with the script below but when the input is very large it takes very long and takes up cpu usage so I was wondering if someone could tell me a faster way to achive this.
Last edited by Neo; 08-31-2009 at 04:47 AM..
Reason: code tags.
I am trying to create a new file(string) with todays date in a backup folder
string= `date '+%d%m%y'`
find * * * /home/SMB-2000/* -print |cpio -ovm > /home/bkups/$string
After excecuting I get the messege
# ./b2 ... (3 Replies)
hi
i am reading a directory, and reading those files one by one
i need to write some of file contents to a new file ,for this i need to create a new file for each file
please tell me how to create new file in shell script
thanks
Satya (4 Replies)
Hi,
I want to create a file from within a script that checks whether the file itself exists or not. Like:
if ] then
echo Creating file...
cat << EOF > .theFile
echo This line should be in the file
EOF
fi
If I run the script with no condition (commenting... (2 Replies)
I have a requirement, which is as follows
*. Folder contains list of xmls. Script has to create new xml files by copying the existing one and renaming it by appending "_pre.xml" at the end.
*. Each file has multiple <Name>fileName</Name> entry. The script has to find the first occurance of... (1 Reply)
Hi,
I have this data:
Jun 16 88.191.117.191 = 100
Jun 16 88.191.117.191 = 70
Jun 16 88.191.117.191 = 30
Jun 16 200.242.67.142 = 65
Jun 16 125.77.107.212 = 40
Jun 16 125.77.107.212 = 60
And I want to have the ff ouput:
Jun 16 88.191.117.191 = 200
Jun 16 ... (6 Replies)
Hi to all,
I got this content/pattern from file http.log.20110808.gz
mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1
mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU
mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Hello,
Be indulgent for my english.
Can you help me ?
function f1 {
}
egrep -v '^#' list_file \
| while read arg1 arg2 arg3 arg4; do
f1 $arg1 $arg2 $arg3 $arg4
done
In list_file there is
I want to replace list_file by a $var
then when i launch the script with a file's... (13 Replies)
Hi I have some simple script within the context of a cgi script that create a file to write to. If I run the script from the command line as root the file is created with no issue. However when I run the script from a web page with the apache account, it dies. The code lines are:
sub... (3 Replies)
I created a script that will go out and so a "/sbin/chkconfig --list | egrep XXX" against a server list that would create an output file like the following example:
----------------------------------------------------------------------------------
SERVER1
RC_Script_1 0:off 1:off 2:off... (4 Replies)
1) Do you use LDAP on AIX? (as a client)
2) If yes, what LDAP server technology do you use:
a) IDS (or ITDS) - IBM Tivoli Directory Server
b) AD
c) openLDAP
d) other - please list.
I ask, because I am looking at openLDAP as well as IDS and am wondering if there is a clear preference I... (4 Replies)
Discussion started by: MichaelFelt
4 Replies
LEARN ABOUT SUSE
alter_group
ALTER GROUP(7) SQL Commands ALTER GROUP(7)NAME
ALTER GROUP - change role name or membership
SYNOPSIS
ALTER GROUP groupname ADD USER username [, ... ]
ALTER GROUP groupname DROP USER username [, ... ]
ALTER GROUP groupname RENAME TO newname
DESCRIPTION
ALTER GROUP changes the attributes of a user group. This is an obsolete command, though still accepted for backwards compatibility,
because groups (and users too) have been superseded by the more general concept of roles.
The first two variants add users to a group or remove them from a group. (Any role can play the part of either a ``user'' or a ``group''
for this purpose.) These variants are effectively equivalent to granting or revoking membership in the role named as the ``group''; so the
preferred way to do this is to use GRANT [grant(7)] or REVOKE [revoke(7)].
The third variant changes the name of the group. This is exactly equivalent to renaming the role with ALTER ROLE [alter_role(7)].
PARAMETERS
groupname
The name of the group (role) to modify.
username
Users (roles) that are to be added to or removed from the group. The users must already exist; ALTER GROUP does not create or drop
users.
newname
The new name of the group.
EXAMPLES
Add users to a group:
ALTER GROUP staff ADD USER karl, john;
Remove a user from a group:
ALTER GROUP workers DROP USER beth;
COMPATIBILITY
There is no ALTER GROUP statement in the SQL standard.
SEE ALSO
GRANT [grant(7)], REVOKE [revoke(7)], ALTER ROLE [alter_role(7)]
SQL - Language Statements 2010-05-14 ALTER GROUP(7)