Search Results

Search: Posts Made By: guessingo
1,089
Posted By guessingo
Calling a script from a shell that needs to cancel out of infinite loop
I am writing a shell script that calls this oracle utility to get some information about the DB that I need for the script

https://docs.oracle.com/cd/B16240_01/doc/em.102/e15294/options.htm
...
3,913
Posted By guessingo
Dynamically changing environment variable
Linux Redhat, BASH Shell.

I want to put this in my .bash_profile

I have log files that go to directory paths based in part on other variables such as went DB Name is set in memory. So if the DB...
1,228
Posted By guessingo
sed and egrep question
Its really 2 questions, but both are pretty basic.
Linux Redhat

1. Need to do a search and replace on a file.
I need to append '--' (comment out the line) to specific lines based on a wildcard...
3,372
Posted By guessingo
Remove trailing number
I have some strings such as

ABC1
ABC2

TYFASDD12

They will only have letters and numbers. In each case I want to remove the last digit? The lengths will vary. So a hard coded substr won't...
Forum: Programming 05-24-2012
1,679
Posted By guessingo
Doing a SQL rollup in unix
If anyone is familiar with Oracle, there is a way to trace a file. Then there is is a script called tkprof that will generate a report that includes a rollup of some values. The problem with this...
3,234
Posted By guessingo
basic data validation
hpux. older version. don't have alot of the newer features in some utilities.

How do I verify that a variable starts with the letter A. I would like to make it case insensitive.

Also, if I have...
Forum: Programming 05-07-2012
1,686
Posted By guessingo
grepping a range of values
I need to return all records in a file starting with

a row that says

TABLE: <tabl name>
lists of hexadecimal records

TABLE: <some table>

TABLe is a key word in the file. I know the name...
8,665
Posted By guessingo
thanks, but I don't quite follow the syntax ...
thanks, but I don't quite follow the syntax


comm -13 tmpfile tmpfile2 | grep -vf- filename > newfile

-vf-

what is vf?

why do you have a '-' after the f? I have never seen that in unix...
16,640
Posted By guessingo
xargs vs. pipe
I have been using unix on and off for a number of years. I am not a sys admin. I use what I need. I have googled this, but I really can't figure out what is the difference between using xarg and just...
8,665
Posted By guessingo
pipe search pattern into a grep
comm -13 tmpfile tmpfile2 | grep -v <filename> >newfile


so i want to
1. find records in 1 file bot not in another
2. The output of the first part is 1 field in a file with many fields.
3....
2,927
Posted By guessingo
HPUX and comm command
I need to compare 2 files. I need to see if 1 file has records that are not in a second file. I did some searching and found the 'comm' command. According to the man pages

comm -23 test1.txt...
Forum: Programming 04-16-2012
991
Posted By guessingo
how do i do 'ands' inside awk. when i said and i...
how do i do 'ands' inside awk. when i said and i meant

if [ awk stuff ... ] AND [ awk stuff ] then

how do i do the ands inside the awk script itself? that is the question I am asking.
Forum: Programming 04-16-2012
991
Posted By guessingo
yes. but i dont see how that matters. you search...
yes. but i dont see how that matters. you search by field. I was hoping to do it in one awk command as opposed to multiple 'and' statements.
Forum: Programming 04-13-2012
991
Posted By guessingo
little awk help
i need to search a script that looks like this

Value Last number O R-Cycle Days Left
seq1 5 N N 500
seq2 14 N Y ...
954
Posted By guessingo
reading a script and summing some values
I need help reading and summing some values in a file that looks like the following. This is an Oracle trace file. Oracle has as utility to do this,but it doesn't work properly unless my sql...
5,062
Posted By guessingo
capturing exceptions from an scp clause
hpunix

I have a script, that will scp -p a file. The server has keys set up. So I don't even pass a username.

scp -p filename server:/directory

There is a small chance that I can get an...
7,470
Posted By guessingo
Thank you. I am not very good with awk. so I...
Thank you. I am not very good with awk. so I don't quite follow the syntax
I do understand what you are doing. Just wanted to break it down, so I can write this myself.

"$(awk '$6~/MYPROD/{print...
7,470
Posted By guessingo
Finding whether a value exists or not in a file
I am running a query against a database and spooling it to a file.
I need to check to see if a certain value is in a specific field.

I can use awk to check the specific field.
However, part...
Forum: Programming 10-12-2011
20,282
Posted By guessingo
difference bewteen pipe, xargs, and exec
I have read several docs on these on the web and looked at examples. I can't figure out the difference. In some cases you use one or the other or you combine them.

can someone help me understand...
2,934
Posted By guessingo
setting a shell script variable in awk
The following is part of a larger shell script


grep -v "Col1" my_test.log | grep -v "-" | awk '$5 == "Y" {print $1}'


instead of printing, can I set set $1 to a variable that the rest of...
2,936
Posted By guessingo
poderosa ssh client on hp-unix
I have

tools -> options -> terminal -> buffer -> 999999

but when I scroll up, I often lose what I scroll up to. This always happens when I am connected to oracle in sqlplus. This has never...
2,337
Posted By guessingo
Thank you for your help and the tip on the book....
Thank you for your help and the tip on the book. I'll check it out. I googled around and found some intro pages. I have used a link awk in my scripts such as print a certain tab, but that is it.
...
2,337
Posted By guessingo
basic awk questions
I find an script with awk sitting around. I went through some online manuals, but I can't figure out exactly how it works. I can't post the whole program. Not allowed.

This is the line that is...
728
Posted By guessingo
sorting when i need to re-arrange
I have a directory with files of the form

<name>_rpt_DDMMYY_HH24:00.html

I need to list them by YYMMDD and I need to get the full name back.
864
Posted By guessingo
sorting issue
I have files with the name


myfile_YYMMDD.txt

I need to sort them by their date stamp. I know this will work.

ls -lrt * | awk '{print $9}' | cut -d "_" -f3 | sort

However, it just...
Showing results 1 to 25 of 55

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