Since you are really confused let's try:
1. type in the commands exactly as given below- to type a command use lowercase, press the ENTER key at the end of the line - note: the words in uppercase HAVE to be uppercase. The $ is required in front of $SHELL.
2. Next, copy the results (or transcribe them) and post them here so we can see the results.
and with regard () all by itself like that - it is two characters: open paren ( and close paren ). As you wrote it, for most shells (what the $SHELL thing shows) ( ) does nothing. Those characters are shift-9 and shift-0 on most keyboards.
:D i am pretty much new to scripting and don't want to pick up bad habits so I am trying to get myself to use brackets in my scripts since I plan on using them alot.. !
in this example of a script I wrote I can not figure out where the brackets go can anyone give me some insight into the use of... (3 Replies)
hi all,
i want to delete brackets in all the file and to keep the string or data between them ( example Q --> Qxxx) with sed command..
thanks (4 Replies)
Hi,
I have a query term like this:
$query="apple NOT banana AND fruits";
$query="a1 NOT prim1 AND a2 NOT a3 OR a5";
I want to apply brackets to the NOT terms and the output should be like this:
$query="apple NOT (banana) AND fruits";
$query="a1 NOT (prim1) AND a2 NOT (a3) OR a5";... (2 Replies)
Hi,
I just came across an interesting shell script syntax like the one below:
] && (trap 'rm -rf ${WORK_DIR}/*.$$; echo "\n\nInterrupted !!\n\n"; exit 4' 1 2 3 15)
Can someone please explain the code snippet above?
The trap command bit is fine but ] && is the hazy part.
Generally we use an... (2 Replies)
Hi
I am having hard time getting this right and need some help. I Have several log files, and everyone contains the following 3 lines at the end:
4 ETW000 Disconnected from database.
4 ETW000 End of Transport (0000).
4 ETW000 date&time: 13.01.2011 - 08:03:28
I need to capture the value... (7 Replies)
Hello,
I am trying to write a script using ksh. And I want to get the value within the first brackets of a string. For example:
14/04/11 11:35: 00 This is (nn) from the earth.
Then i hope to get nn in this case.
Can any one advise me how to implement it?
Thank you very much!
nn (2 Replies)
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Hi all. i need a small help.
i have written an exit code, which will check whether mo.sh is successful or not. if the status is >0 it will exit the shell.
1>Do you guys think it is a correct way to write?
2>what if i change the double bracket to single. how will it change the o/p.
... (1 Reply)
Hi
I am having hard time getting this right and need some help. I Have 3 files, and everyone contains the following:-
File1
Today, we have Name(Jack) Age(19) Class (A2)
Today, we have Name(Kim) Class (G9)
File2
Today, we have Name(Lee) Age(19) Class (A2)
Today, we have... (8 Replies)
Discussion started by: samsan
8 Replies
LEARN ABOUT NETBSD
chroot
CHROOT(8) BSD System Manager's Manual CHROOT(8)NAME
chroot -- change root directory
SYNOPSIS
chroot [-G group,group,...] [-g group] [-u user] newroot [command]
DESCRIPTION
The chroot command changes its root directory to the supplied directory newroot and exec's command, or, if not supplied, an interactive copy
of your shell.
If the -u, -g, or -G options are given, the user, group, and group list of the process are set to these values after the chroot has taken
place; see setgid(2), setgroups(2), setuid(2), getgrnam(3), and getpwnam(3).
Note: command or the shell are run as your real-user-id.
ENVIRONMENT
The following environment variable is referenced by chroot:
SHELL If set, the string specified by SHELL is interpreted as the name of the shell to exec. If the variable SHELL is not set, /bin/sh is
used.
SEE ALSO ldd(1), chdir(2), chroot(2), environ(7)HISTORY
The chroot utility first appeared in 4.4BSD.
SECURITY CONSIDERATIONS
chroot should never be installed setuid root, as it would then be possible to exploit the program to gain root privileges.
BSD August 13, 2011 BSD