Search Results

Search: Posts Made By: omega3
5,984
Posted By rovf
I would write tail -n +2(with space). I think...
I would write tail -n +2(with space). I think this is the "most canonical" form. On very old Unixes, the first variants of head and tail did not provide the -n switch. Then, for some time, I found it...
5,984
Posted By RudiC
It principally reads: if tail +2 doesn't work for...
It principally reads: if tail +2 doesn't work for you (it does on my computer), try tail -n+2. Generally: check the man page for your tool & version to find out what it provides and what it misses.
...
5,984
Posted By RudiC
It frequently helps to consult the man pages. man...
It frequently helps to consult the man pages. man tail:
5,984
Posted By rovf
You can also use awk: awk "NR >=...
You can also use awk:


awk "NR >= $from_line && NR <= $to_line {print}" $filename
5,984
Posted By RudiC
Try head -7 file | tail +2 hello asia ...
Try

head -7 file | tail +2
hello asia
hello europe
hello africa
hello america
hello antartica
hello australia
5,984
Posted By RudiC
Did you consider the head and tail *nix commands?
Did you consider the head and tail *nix commands?
3,330
Posted By drysdalk
Hello, I would imagine that under normal...
Hello,

I would imagine that under normal circumstances the kernel would choose to allocate memory from the free pool first, before flushing out buffers, cache or anything else. It all depends...
3,330
Posted By drysdalk
Hi, Taking your questions in turn: 1....
Hi,

Taking your questions in turn:

1. Buffers and cache are essentially types of memory that, whilst they are in use, could be freed up if the system required memory for some other purpose. ...
1,428
Posted By gull04
Hi, Just a quick update, now that I have a...
Hi,

Just a quick update, now that I have a bit of time.

-bash-3.2$ ls -l test*
-rw-r----- 1 e415243 other 4037689 Dec 19 14:35 test_file_01.txt
-bash-3.2$ wc -l test*
139186...
1,170
Posted By MadeInGermany
Method1 sets just selected permission bits: g+x...
Method1 sets just selected permission bits:
g+x -> set the x bit for group.
ug+x -> set the x bits for user and group.
o-x -> clear the x bit for others.
Method2 sets all permission bits. The...
1,170
Posted By RudiC
I don't think there's a reason to prefer one to...
I don't think there's a reason to prefer one to the other; they are equivalent...
8,655
Posted By radoulov
To defer the expansion of the variables: ...
To defer the expansion of the variables:

bash-3.00$ su - oracle -c "x=1; echo $x"
Password:
Sun Microsystems Inc. SunOS 5.10 Generic January 2005

bash-3.00$ su - oracle -c "x=1; echo...
8,655
Posted By radoulov
Try this: su - oracle -c " export...
Try this:

su - oracle -c "
export ORACLE_SID=BRCFMS
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/dbhome_1
export PATH=\$PATH:\$ORACLE_HOME/bin

sqlplus -s scott/tiger <<EOF
spool...
6,917
Posted By Chubler_XL
The problem I think is that some of your $...
The problem I think is that some of your $ variables are being expanded before the su command is run, try escaping them like this, I don't really like $11 either, can I suggest ${1}1 for more...
6,917
Posted By sea
sample_cmd: printf "My location is: $0 My...
sample_cmd:
printf "My location is: $0
My arguments are: $*
Database: $database"

Your script:
database=myDBname
echo EXEC:
sh /path/to/../sample_cmd $database
echo SOURCE
....
6,917
Posted By sea
Yes. You could try this: su -c "echo...
Yes.
You could try this:
su -c "echo $UID;whoami;echo $USER"

EDIT -- happens when one answers at the end of page one... --

Does the o_info script (as in Chubler's example) check for $1 ?
...
6,917
Posted By jim mcnamara
Uh, no. The shell parser on the receiving end of...
Uh, no. The shell parser on the receiving end of su -c has to know this is one command.

su - someuser -c 'ls; grep foo bar'
su - someuser -c "ls; grep foo bar"

Either of these will work.
...
6,917
Posted By vbe
-c is for command.. that means a string, so to...
-c is for command.. that means a string, so to pass more than 1 string you will use double quotes making what is within considered as a single...
6,917
Posted By Chubler_XL
You can do it like this: su - oracle -c...
You can do it like this:

su - oracle -c "source /home/oracle/BATGPRD1_oracle_env;sqlplus -s / as sysdba <<EOF ; ps -ef | grep pmon ; srvctl start database -d BATGPRD
spool...
6,917
Posted By Subbeh
EOF needs to be on it's own, try this: EOF ...
EOF needs to be on it's own, try this:

EOF
ps -ef | grep pmon ; srvctl start database -d BATGPRD'
2,491
Posted By Yoda
This is what Robin meant: egrep -v...
This is what Robin meant:
egrep -v "^PWRBRKER-3493|^PWRBRKER-7834|^SCHEDULER-ERROR" myapplication.log > tmp; mv tmp myapplication.log
2,491
Posted By rbatte1
Have you read the manual pages for egrep? ...
Have you read the manual pages for egrep?

Have a look at the -v option and consider the special character ^ meaning the start of the record.


Does this help you out?



Robin...
2,925
Posted By hergp
You are right, that vi wrote a newline at the end...
You are right, that vi wrote a newline at the end of the file. That's what most editors do.

The cause is probably, that clusterware does not mind or care about the terminating newline.

You can...
2,925
Posted By hergp
It seems, your file /etc/oracle/config.loc does...
It seems, your file /etc/oracle/config.loc does not end with a newline character.

Opening and saving the file with a text editor, like vi, should correct this issue.
2,768
Posted By Yoda
The curly brace form is a bash sequence...
The curly brace form is a bash sequence expression

From bash man page:
A sequence expression takes the form {x..y}, where x and y are either integers or single characters.

When integers are...
Showing results 1 to 25 of 40

 
All times are GMT -4. The time now is 01:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy