Search Results

Search: Posts Made By: edstevens
19,760
Posted By Scrutinizer
Hi, a pipe appears to be missing: egrep -v...
Hi, a pipe appears to be missing:
egrep -v '^listener' |\
5,182
Posted By vgersh99
man crontab yields : The ``sixth'' field...
man crontab yields :

The ``sixth'' field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or %
character, will be...
3,156
Posted By vgersh99
Depending on your OS... either: sed -i -f...
Depending on your OS...
either:
sed -i -f script.sed $i
OR
{ rm $I; sed -f script.sed > $i; } < $i
OR
other multiple other ways...
3,182
Posted By RudiC
There you are - EOF with three trailing...
There you are - EOF with three trailing spaces! Try without.
1,988
Posted By RudiC
Hold on, hold on! How do you explain the...
Hold on, hold on! How do you explain the difference in above outputs:
oracle:fs$ ps -ef|grep '[p]'mon_$ORACLE_SID
oracle 1631 1 0 Jan22 ? 00:00:54 ora_pmon_fs91dmo
oracle 2842 ...
1,912
Posted By Don Cragun
From the output you have shown us, it appears...
From the output you have shown us, it appears that ed is doing what you requested. So, if the contents of /etc/oratab have gone back to their original state when the script terminates, it would seem...
1,843
Posted By Corona688
That's right. If select is breaking on that...
That's right.

If select is breaking on that column, I suspect it has a newline in it.
1,843
Posted By Corona688
Try changing the value of IFS to newline, so...
Try changing the value of IFS to newline, so select (and shell syntax in general) only splits output on lines:

OLDIFS="$IFS"
IFS="
" You'll want to do IFS="$OLDIFS" whenever not in that loop to...
1,295
Posted By Corona688
Calling the write() system call does not create a...
Calling the write() system call does not create a file. Only open() does that, and the only time your program does that is when you do > filename.

In UNIX, where a file is and what its contents...
2,351
Posted By Corona688
I suspect it's named -p\n or some other such...
I suspect it's named -p\n or some other such garbage or else you'd have been able to remove it with rmdir /-p.

If it's an empty folder, ls -li won't show anything. -d tells it to show the folder...
12,155
Posted By drl
Hi. It is not easy to understand code that...
Hi.

It is not easy to understand code that has been extracted from a larger source. Here is a shell script that drives a portion of the bash-select-code, but rendered in perl so that you can run...
12,155
Posted By drl
Meta-answers
Hi, edstevens.

I like to know answers, too. However, some questions are more important to me than others -- we all set priorities.

So some of the ways to get answers for:

1) Keep asking the...
1,579
Posted By vgersh99
in order to avoid parameter expansion within the...
in order to avoid parameter expansion within the 'here-doc' (\$parameter) quote the "EOF".
Doing 'man bash" yields the following:

The format of here-documents is:

...
1,579
Posted By Perderabo
I don't know sqlplus and therefore I don't know...
I don't know sqlplus and therefore I don't know what effect you hope to achieve. I also don't understand your need to use use backquotes. But try doubling the backslash.


bash-3.1$
bash-3.1$...
996
Posted By CarloM
You could try changing the field separator to...
You could try changing the field separator to something other than whitespace (e.g. a comma) - either in sqlplus (set colsep ,) or in the shell (IFS=,, and unset it afterwards).
2,455
Posted By CarloM
What's the output from running Don's suggestion...
What's the output from running Don's suggestion with sh -x?
2,455
Posted By Don Cragun
You're making this way to hard. If your script...
You're making this way to hard. If your script above works, the following should work just as well without using the temp file:
srvctl config database |
awk -F\" '{print "srvctl config database -d...
1,736
Posted By Corona688
I'd use a variable for that. When you detect...
I'd use a variable for that. When you detect files, change the variable, and it'll stay changed.

find may be more efficient than ls | grep.

trap "rm -f /tmp/$$" EXIT
INTERVAL=300

while...
1,821
Posted By Yoda
awk '/STARTUP/{i++}/END/{print;i=0}i' file ...
awk '/STARTUP/{i++}/END/{print;i=0}i' file

Please see the corrections:
lines=`grep -m 1 -n "STARTUP" inputfile.txt | awk -F: '{print $1}'`
fline=`expr $lines - 1`
echo ":" $fline ":"
sed -e...
3,278
Posted By methyl
Assuming that your file has records terminated...
Assuming that your file has records terminated with carriage-return line-feed, we can probably eliminate the format of the file.


There is a little-known "feature" of Microsoft Outlook where a...
1,922
Posted By hergp
To get rid of the blank, replace a comma with a...
To get rid of the blank, replace a comma with a blank in the awk-command. NR is a special variable which holds the current line number, as you may have guessed.


awk '{ print "SOMECANNEDTEXT" $0...
1,095
Posted By aster007
Used cut instead of awk. Not sure why "awk"...
Used cut instead of awk. Not sure why "awk" doesn't list the first one.
Maybe someone with superiour UNIX knowledge can help here.

ls /dev/sd[b-z] | cut -f3 -d "/" | awk '{print "some text" $1...
789
Posted By jim mcnamara
awk 'FILENAME=="file1" {arr[FNR]=$0; next} ...
awk 'FILENAME=="file1" {arr[FNR]=$0; next}
FILENAME=="file2" {sub("@tag@", arr[FNR], $0); print}' file1 file2 > newfile
Showing results 1 to 23 of 23

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