Search Results

Search: Posts Made By: michieka
22,706
Posted By michieka
Problem solved
Taking out the blank line between grep and if did the trick. Thanks so much. I'm using AIX and the korne shell.

Happy New Year... (indeed!)
22,706
Posted By michieka
Thanks google but...
I did do extensive searching here to no avail... I found many variations, but none that inserted a blank line if not found. In fact, in reviewing the thread you linked I still don't see the answer. ...
22,706
Posted By michieka
I also tried...
cat file1 | while read line
do grep $line file2 >> file3

if [ $? -eq 1 ]
then
print "\n" >> file3
fi
done

This still only gives me a file3 of:
123 Joe
456 Man
101 Rob

I need to...
22,706
Posted By michieka
Insert blank line if grep not found
Hello everyone... please help if you can -- I'm stumped. Making this work will save me hours of manual labor:

I need to search file2 for pattern in file1. If pattern found append file2 line to...
5,830
Posted By michieka
...okay, one more post for my sanity sake... it...
...okay, one more post for my sanity sake...
it looks like the cmd="$cmd -e /^$WORD/d" line and the sed $cmd... line are redundant can you put what is happening here in newbie english please sir?
...
5,830
Posted By michieka
hmmm.... now that time I got no change at all. ...
hmmm.... now that time I got no change at all. file2 same as file3... I guess I took away the special meaning of the caret so it was literally looking for a ^.

I tried this on the "real" files...
5,830
Posted By michieka
Drap! ksh on AIX. It may just be a bug. ...
Drap!
ksh on AIX. It may just be a bug. Basically, I want to search for lines in file2 that begin with entries in file1 and either edit file2 and save it with the lines removed or write a new...
5,830
Posted By michieka
That works! Now I want to make sure that $WORD...
That works! Now I want to make sure that $WORD is at the beginning of the line. Shouldn't this work?

while read WORD
do ...
5,830
Posted By michieka
what about file3?
Thanks! I want to put the new file2 (with the lines already deleted) into a new file3. Also, I need to make sure $WORD is at the beginning of the line. I tried the below but got an empty file3.
...
5,830
Posted By michieka
delete lines from file2 beginning w/file1
I've been searching around here and other places, but can't put this together...

I've got a unique list of words in file 1 (one word on each line).
I need to delete each line in file2 that...
26,484
Posted By michieka
ok thanks!
ok thanks!
26,484
Posted By michieka
Does .forward send all...
Does .forward send all the mail if you put it in /etc/sendmail. I thought there was something I could put in the script itself (that is to be run by cron) that would send only THAT particular...
26,484
Posted By michieka
Change default email for cron
How do I change who the default email goes to from cron jobs. I know it goes to the user by default. The man pages say I can use the mailto command, but I don't seem to have that on my system. AIX...
9,645
Posted By michieka
Autologout... this worked
Stopudt is a unidata (database) command that issues a kill -15 I believe to let things finish writing.


#!/usr/bin/ksh
# ...
26,484
Posted By michieka
Running AIX 4.33. This is the script. I had to...
Running AIX 4.33. This is the script. I had to put some environment variables in there, but simply putting the PATH probably would have worked as well. Using sed and awk to get the PID numbers...
26,484
Posted By michieka
What user runs cron?
I have a command that is found in /usr/ud51/bin called stopudt which safely stops idle database users (let's writes finish, etc).

If I login as root and issue stopudt [PID] the process is stopped....
9,645
Posted By michieka
I did the search before. I guess I was using the...
I did the search before. I guess I was using the wrong keywords or something. Thanks for your help! I'll try these...
9,645
Posted By michieka
logoff idle user script
Will someone please share a script with me that will read in each line of the who -u output and if idle time is more than 50 min, execute a kill on the PID? This is what I have so far:

who -u |...
39,962
Posted By michieka
Way cool... I really appreciate it.
Way cool... I really appreciate it.
39,962
Posted By michieka
awk works... I can do wonders
Thanks, I was trying to do this as a two step process, but actually with these commands I can make it one step. My ultimate goal here was to compare two 'FIELDS' that were originally in the same...
39,962
Posted By michieka
Thanks so much!
Thanks so much!
39,962
Posted By michieka
I got it...! I needed to remove the dots/periods...
I got it...! I needed to remove the dots/periods first.
How could I have done this in one command?

sed 's/[.]//g' < names > names3
sed 's/[a-zA-Z]* //g' < names3 >names4
39,962
Posted By michieka
The filename is names: I tried. sed...
The filename is names: I tried.
sed 's/[a-zA-Z]* //g' < names

and got:

D.Bullock
Ham ...
39,962
Posted By michieka
extract last word on line to new file
Can someone please help me with how to extract the last word on a line to a new file? I have a list of names like:

Ms. Nell D. Bullock
Mrs. Sherrie M Avent
LINDA ANNETTE RUSSELL
Mr. Jerome R....
2,636
Posted By michieka
Good idea to stop database
I'm running the backup command. I can stop the database service/daemon before the backup starts and just restart it. I didn't think of that... thanks
Showing results 1 to 25 of 28

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