Search Results

Search: Posts Made By: chatguy
2,564
Posted By chatguy
Thanks everyone above for your help! And...
Thanks everyone above for your help!

And MadeInGermany, thank you so much!!! What you suggested works great!!! I never thought this could be achieved with 1 simple line of awk!!

Thanks...
2,564
Posted By chatguy
Unfortunately this attempt doesn't work, because...
Unfortunately this attempt doesn't work, because it incorrectly deletes the rest of the file:

#Remove deletethisentry.com
sed -n '/deletethisentry.com/{:a;N;/"};"/!ba;N;s/.*\n/ /};p'...
2,564
Posted By chatguy
How to search & delete inclusively between two lines?
Hi all, I was wondering if anyone would know how to search & delete inclusively between two lines, please:

Important:
There are multiple }; lines. I'm curious how to delete the correct one...
10,010
Posted By chatguy
Hmm... no luck there either. I tried doing a...
Hmm... no luck there either. I tried doing a search online, since I thought removing whitespace in a variable would be a common request. I've tried the above and all these with no luck though: ...
10,010
Posted By chatguy
Thanks, Yoda! That did the trick! One other...
Thanks, Yoda! That did the trick!

One other Q though... if possible, would you know offhand how to remove the leading space?
2620:42::192:168:159:10

Thanks again
cg
10,010
Posted By chatguy
Thanks, but no luck, unfortunately :( #...
Thanks, but no luck, unfortunately :(
# ifconfig lo0:5 inet6 | awk 'gsub(/inet6 |\/.*/,x)'
awk: syntax error near line 1
awk: bailing out near line 1
10,010
Posted By chatguy
How to extract IPv6 address from string?
Hi All,

Would anyone know how to modify the below, so only the IPv6 address (red) is printed, please?
(in other words, what's between inet6 and the / sign)
ipv6=`/sbin/ifconfig lo0:5 inet6 |...
5,812
Posted By chatguy
Going above and beyond w/ efficiency :)
Hi RudiC-

Wow, I was really excited to see this idea too since I'm a big fan of efficiency.

Unfortunately, as you mentioned may be the case, "stat" isn't available in my environment...
5,812
Posted By chatguy
SOLVED
Hansen,

You are a genius! At the same time, I never thought it was this easy to do this! Thank you and everyone who chimed in!!

ps: If the word DONE was not previously in the file, the...
5,812
Posted By chatguy
Replies to Hanson, Biker & Alister & more info on how to solve...
Hi Hanson:

Hm, I think you're on to something. I'll admit, I'm not sure how to "tail in the background" for every 10-seconds, if that is what you mean. (As you can tell, I'm probably somewhere...
5,812
Posted By chatguy
A better description of what I hope to be doing:
I suppose I should elaborate:

What I'm modifying is a KSH automation script, that's run on demand, for testing a piece of software.

What this KSH script does/need to do: (Step 2)

1)...
5,812
Posted By chatguy
Can't use a sleep/counter for this solution :(
Good idea, but unfortunately I can't use a sleep/counter anymore :(

I am actually currently using a sleep/counter now, but I need to now change it to something that monitors the logs.
...reason...
5,812
Posted By chatguy
How to have my ksh script pause, until something appears in the logs.?
All,

Is there some way to have my KSH script pause, until the word "DONE!" appears in the logfile /logs/log.txt?

Difficulty: The word "DONE!" may already be present in logs from the past. ...
9,539
Posted By chatguy
Thank you both Shell_Life & fpmurphy! For...
Thank you both Shell_Life & fpmurphy!

For those that need an XML parser to work similar to this scenario reading in the future, it turns out a perfect combination of the 2 suggestions above were...
9,539
Posted By chatguy
XML parsing in KSH
Hi All,

Although I was able to find past XML parsing questions, as the questions were a little different than this, I had a pretty hard time adapting those answers to this scenario.

-> May I...
1,694
Posted By chatguy
Hi Bartus, Wow. A semi-colon was all I...
Hi Bartus,

Wow. A semi-colon was all I needed. My gosh, I could streamline/improve so much of my past script knowing that now. Thank you so much for not only helping me out here, but in...
1,694
Posted By chatguy
How would I do 2 search & replaces in 1 Perl statement?
Hi All,

The below code successfully tails the logfile.log file and colors every word "ERROR" in RED, thanks to the Perl statement below.

However, would anyone know how to append 1...
6,745
Posted By chatguy
DG, Thank you so much! This works perfectly! ...
DG,
Thank you so much! This works perfectly! Also thank you for the hint about using SIGINT instead of SIGERR. I changed this as well.

Thanks again for all the help,
CG
6,745
Posted By chatguy
[Solved] How do you get a "Ctrl-C trap" working w/ a piped "tail -f" ?
Hi All,

Although each line below seems to work by itself, I've been having trouble getting the Control-C trap working when I add the "|perl -pe..." to the end of the tail -f line, below.
...
1,811
Posted By chatguy
Hm, looks like you're right about wildcards. ...
Hm, looks like you're right about wildcards. Will list out the files in the script. That will work. Thanks!
cg
1,811
Posted By chatguy
Although that does work, Is there a way of doing...
Although that does work, Is there a way of doing this without changing the directory beforehand? (apologies for not asking that part of it in the original question) Thanks!

cg
1,811
Posted By chatguy
TAR question (probably a very simple answer)
Hi All,

I have a (probably) very simple tar question on a Solaris box that I'm a little embarrassed to ask. After repeatedly checking man tar and searching for solutions online (I'm not sure of...
1,198
Posted By chatguy
Thanks everyone. Everyone definitely has been...
Thanks everyone. Everyone definitely has been very helpful, and the multiple responses have been very good as these have taught me how to adapt to similar (but different) scenarios I've been wanting...
1,198
Posted By chatguy
Awk question
Hi all,

I assume this question involves an answer with awk(?). I'm able to figure out how to extract a certain word if spaces are involved, but have been having difficulty figuring this...
19,258
Posted By chatguy
Thanks guys Wow... so simple yet I tried...
Thanks guys

Wow... so simple yet I tried everything but that (go figure). Thank you so much for your help!

cg
Showing results 1 to 25 of 37

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