Search Results

Search: Posts Made By: curleb
1,491
Posted By curleb
another option is to embed the shell variable...
another option is to embed the shell variable itself without using awk's variables:

ps -ef |awk '($8~/proc/ && $9~'$(echo "r${SVRNAME}")') {print $2}'
1,491
Posted By curleb
is $SVRNAME actually defined? What output ARE...
is $SVRNAME actually defined? What output ARE you getting?
1,491
Posted By curleb
try to cuddle your args with curly brackets:...
try to cuddle your args with curly brackets: "r${SRVNAME}", for example.

Especially in string context, the shell won't see them without the curly brackets...if they're adjacent to other strings...
11,112
Posted By curleb
Add the following to your own dot file so it's...
Add the following to your own dot file so it's sourced upon login or be sure to define it ahead of use within your script:

PATH=${PATH}:"/path/to/DSM"

Otherwise, as had Peasant said: just be...
20,557
Posted By curleb
Depending on your version, I believe there's...
Depending on your version, I believe there's either a shell() or an exec() call available to allow you to use a local SSH client like putty.

You could probably accomplish it either as a direct...
1,815
Posted By curleb
From here I cannot be certain of what the...
From here I cannot be certain of what the TR_CNTO328.sh script is doing, but it seems like a banner from an SSH or SCP/SFTP connection. Based on your session listing from earlier, it looks like the...
7,033
Posted By curleb
You'd really just want to output the results to a...
You'd really just want to output the results to a file and then mail the entire file to your designated recipients. Such as the much maligned:

cat output.file |mailx -s "Ping results..."...
1,815
Posted By curleb
Do you have any control over the TR_* script...
Do you have any control over the TR_* script itself? Seems like it's own echoes to screen would need to be told to rediect to STDOUT (ie, >&1).
12,939
Posted By curleb
Are you comfortable w using Perl? There are a...
Are you comfortable w using Perl? There are a few modules that parse/read-write excel formats.
1,815
Posted By curleb
In that case, try the tee option given. You're...
In that case, try the tee option given. You're looking for the stats echoed by an internal call to something like SSH...but only managing to capture the banners of the remote system(s). The tee...
1,815
Posted By curleb
Try this: sh .TR_CNTO328.sh >...
Try this:


sh .TR_CNTO328.sh > TR_CNTO328.log 2>&1


Or:


sh TR_CNTO328.sh |tee -a TR_CNTO328.log
Forum: UNIX and Linux Applications 01-07-2012
1,847
Posted By curleb
It's never simple if you're leaving it to the...
It's never simple if you're leaving it to the Vendor's documentation. Same goes for the app using the database, if you're using one from off the shelf or an outside Vendor. Many Vendors will...
5,708
Posted By curleb
My overly simplistic answer would be: yes,...
My overly simplistic answer would be: yes, anything's possible in shell scripting...

Not to be a wise-guy, but loops are loops...and most languages are simply restacks of others based on the...
3,364
Posted By curleb
Isolate and scrub your proc's $@ variable. If...
Isolate and scrub your proc's $@ variable. If there's a good chance that someone might paste in a bum set of chars, you'd want to exclude the chance of it break your flow.

If you'd assign the...
1,551
Posted By curleb
So you want to establish a full read on a file,...
So you want to establish a full read on a file, while other threads may still be writing to it?

The tail -f command will only start from a set distance of the original file, and then page down...
1,756
Posted By curleb
You'd really need to base it upon some evaluation...
You'd really need to base it upon some evaluation that you can control. You'd test the inputs, and based on behavior, you'd fork off in whatever direction you need. The following function provides...
2,923
Posted By curleb
Try perl or search this site for date math...
Try perl or search this site for date math tutorials. Plenty of them...
2,923
Posted By curleb
If I could ask: does your innermost loop command...
If I could ask: does your innermost loop command actually work if given your formatted args? For example, what happens if you input:

date -d "2012-01-04 + 6 day" "+%Y_%m_%d"

I get invalid...
732
Posted By curleb
whatever's easiest to get a copy of... (and, I...
whatever's easiest to get a copy of... (and, I should add: free)

Too many Linux distros to name here...and too many zealous fans of each to bother naming one over the other. Otherwise, shell...
Forum: Programming 01-02-2012
1,725
Posted By curleb
Given what you've shown, I'd say you just need to...
Given what you've shown, I'd say you just need to wrap your vars with single quotes when they're used; ie, '$var'. This may not be it, as it's balking at barewords, but it allows for the proper...
Forum: Solaris 12-17-2011
10,279
Posted By curleb
cron doesn't share your usual shell unless you...
cron doesn't share your usual shell unless you explicitly define it, so your not necessarily getting to access oracle the way you're expecting. The output might be an empty resultset, but it's...
2,161
Posted By curleb
Mileage may vary: echo...
Mileage may vary:

echo "12319999\n01012013\n12312011\n01012011" |sort -k1.4 -k5
4,587
Posted By curleb
You'll want to grep -n to identify the line...
You'll want to grep -n to identify the line number, and then you could use your line number as a part of a sed script...
1,013
Posted By curleb
Check to be sure $date is the same as 'Aug...
Check to be sure $date is the same as 'Aug 21'...it may not be, especially if there's a format applied.

Otherwise, please be more clear on your distinction between command-line and shell...do you...
Forum: Programming 07-27-2011
2,609
Posted By curleb
I'd suspect your use of utf-8 and the -chars. Try...
I'd suspect your use of utf-8 and the -chars. Try converting the input file to ISO and try it out again...just to see if there's any correlation.
Showing results 1 to 25 of 376

 

Featured Tech Videos

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