hi,
how can i make use of a command in the replacement segment..
cat a | sed '/^*]\{3\}$/{
s/\(.*\)/REPLACEMENT/g
}'
suppose if I want to use a awk command in the replacement section , how to achieve that ?
Thanks (1 Reply)
I am new to unix ... I have a file with name unixile.123761 I need to cut the extension from this file name? can u help me for this
i have tried like follows
copied the file lo one variable v
and then `echo $v | grep cut -d = -f 1` (8 Replies)
Hi All,
Greetings..
I am having a Line of 1600 characters in which each specifi fields have some values. For example 1-5 Firstname 6-8 Age and so on..
I am using `expr substr $line 100,7` to get values from the line and store in seperate variables..
The file contains 70000 lines. It is taking 3... (8 Replies)
Hi,
I have a script that use some files and generate one file using these files. The main command that i am using in the script is the command cut, but it is very low, and i would like another command to generate my file faster...
My need is be able to use another command similar than "cut"... (2 Replies)
Hi
I am using 'find' on a particular directory which has some subdirectories too,so when I search for .txt files from the parent directory, it gives all files that matches the pattern in the parent aswellas in the sub directories .
eg:
Iam at /a/b/c
where c has many other directories in it ... (7 Replies)
Hello,
I have a file packed with records similar to:
-rw-rw---- 1 pcpdsrv8 suppw 98737 21 Jan 09:08 Workflow_Calc_Distance.log.20101223060615.bin
Could someone tell me how I can cut out all the info up until the Date field please so it looks like:
21 Jan 09:08... (3 Replies)
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
hay
i am trying to get JUST the PID from the ps command.
my command line is:
ps -ef | grep "mintty" | cut -d' ' -f2
but i get an empty line. i assume that the delimiter is not just one space character, but can't figure out what should i do in order to do that.
i know i can use awk or cut... (8 Replies)
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
LEARN ABOUT LINUX
rbash
RBASH(1) General Commands Manual RBASH(1)NAME
rbash - restricted bash, see bash(1)RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is
used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow-
ing are disallowed or not performed:
o changing directories with cd
o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
o specifying command names containing /
o specifying a file name containing a / as an argument to the . builtin command
o specifying a filename containing a slash as an argument to the -p option to the hash builtin command
o importing function definitions from the shell environment at startup
o parsing the value of SHELLOPTS from the shell environment at startup
o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
o using the exec builtin command to replace the shell with another command
o adding or deleting builtin commands with the -f and -d options to the enable builtin command
o using the enable builtin command to enable disabled shell builtins
o specifying the -p option to the command builtin command
o turning off restricted mode with set +r or set +o restricted.
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script.
SEE ALSO bash(1)GNU Bash-4.0 2004 Apr 20 RBASH(1)