I have three cron entries in a file /cron_entries as
15 * * * * /bin/hourjobs > /tmp/hrjob.log 2>&1
..................
....................
I am trying to read this file in for loop using code below:
cron=`cat /cron_entries`
for line in $cron
do
printf... (4 Replies)
Hello,
I am trying to save in a file a single "*" but its not working... look what i am doing...
FILE="/home/teste/a.txt"
...BEGIN...
ASTERISK="*"
echo "STRING $ASTERISK STRING" >> $FILE
...END...
when i do it, the result is a list of all files of the current... (4 Replies)
So, here's the deal... I was attempting to type this:
> grep -R "searchterm" *
and somehow I typed this instead:
> grep -R "searchterm"
> *
I accidentally typed "space-asterisk" on the second prompt. This apparently caused Bash to attempt to run the first file in the pwd, which... (1 Reply)
I want to give my long scripts to customer. The customer must not be able to read the scripts even if he has the password. The following command locks and unlocks the script but the set +x is simply ignored.
The code:
read -p 'Script: ' S && C=$S.crypt H='eval "$((dd if=$0 bs=1 skip=//|gpg... (7 Replies)
I have to print the number of stars that increases on each line from the minimum number until it reaches the maximum number, and then decreases until it goes back to the minimum number. After printing out the lines of stars, it should also print the total number of stars printed.
I have tried... (13 Replies)
Discussion started by: rohit_shinez
13 Replies
LEARN ABOUT SUSE
sg
newgrp(1) General Commands Manual newgrp(1)NAME
newgrp - change effective group ID sg - execute command with different group ID
SYNOPSIS
newgrp [-l] [group]
sg group -c command
DESCRIPTION
The newgrp command changes the user's real and effetive group ID by replacing the current shell with a new shell. A new shell is launched
even if an error occours.
A password is requested if the group has a password and the user is not listed in the group file as being a member of that group. The pass-
word can be changed with the gpasswd(1) command.
If the new effective group ID is not in the supplementary group list, newgrp will add the new group ID to the supplementary list, too.
With no operands and options, newgrp changes the user's group IDs (real and effective) back to the group specified in password and group
file.
The sg command works like the newgrp command, except that it executes the given command with /bin/sh and upon exit the group ID of the cur-
rent shell is not changed.
OPTIONS -l, --login
reinitialize the environment as if the user logged in.
--help Print a help list.
-u, --usage
Print a short usage message.
-v, --version
Print program version.
SEE ALSO gpasswd(1), group(5), passwd(1), passwd(5), su(1)AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils April 2004 newgrp(1)