when I execute this awk stmt ..
awk "/log_directory/ { print $5}" /opt/dba/oraadmin/tools/tmp_purge_op.log
it's returning the whole line as ..
IRMD118_LISTENER1 parameter "log_directory" set to /opt/oracle/10.2/network/log/
my expected output is : /opt/oracle/10.2/network/log
what... (7 Replies)
Whats the syntax to find all lines that matches a text and print out specific fields after the match?
ex:
1: some random text
2: Full name: John E. Smith
3: some random text
4: Full name: Mary J. Lue
5: some random text
So I'd like to print out First names or last names or everything... (2 Replies)
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Hi,
I have a file such that:
40454,31,48,4,1304.967741935484,1
31708,25,48,4,1268.32,1
20900,64501,671,788,0.3240259840932699,0
20137,51358,834,743,0.3920908135051988,0
I want to replace the 6th column by "ones" if it is 1, and with "zeros" if it is 0.
Thanks. (6 Replies)
Hey all,
so I'm using AWK in a project at work, to generate xml from csv. So far things are going relatively smoothly, but I have one thing I can't figure out.
For every field in each row, I must generate <entry name=KWNamex>Field</entry>
Then I will need to pull data from a second file... (6 Replies)
Hi, this must be a simple but this is my first interaction with shell and awk.
following is a log file needed to parse (2 lines separated by a line break for clarity):
2013-07-27 13:32:09,043 - ERROR - PerformanceUtility - Thread-14 - Performance - 9b348407-4f57-4983-a057-a55669821f68 |... (12 Replies)
Hi there,
given the file
FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 FIELD7 FIELD8 FIELD9 FIELD10 FIELD11
Why does not
awk '$6 == "FIELD6" {$6=="GREEN"}1' file
do the work and replace"FIELD6" by "GREEN"?
And second question, what is the purpose of the "1" at the end of... (5 Replies)
Hello,
I have two text files, each with a single column,
file 1:
124152970
123899868
123476854
54258288
123117283
file 2:
124152970
123899868
54258288
123117283
122108330 (5 Replies)
Discussion started by: LMHmedchem
5 Replies
LEARN ABOUT SUSE
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 filename 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)