Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: mph
5,643
Posted By mph
AFAIK, expect always spawns a subshell. The...
AFAIK, expect always spawns a subshell.

The script generated with expect and using netcat doesn't look much different.
Kind of a toss up, I guess.
set timeout -1
spawn $env(SHELL)
match_max...
5,643
Posted By mph
For this type of script I would use expect. If...
For this type of script I would use expect. If you're connecting to an email host that either not too close or, has a bad connection. The sleep statements might not work to well.

Using...
10,915
Posted By mph
Here's something you could try. ...
Here's something you could try.


#!/bin/ksh
#
# Pageme (05/20/00)
# Page me with a short message
#
if [ -z "$1" ]
then
printf "Enter Message (128 Chars Max.): "
read message
else
...
8,995
Posted By mph
Here's a script I wrote a long time ago as I was...
Here's a script I wrote a long time ago as I was having the same issues.
I'll modify it as necessary when I have getopts problems.aflag=
bflag=
while getopts :ab:t: opt
do
case $opt in
...
Forum: UNIX and Linux Applications 05-07-2014
2,033
Posted By mph
Samba loosing SID UID mapping
Hi all,

I don't know how many times I've setup samba shares, but... It's been a while since the last time. The SID UID maps used to always seem random. I.E. if I had to move the data to...
Forum: Programming 02-18-2014
4,155
Posted By mph
First I've gotta get it workig on the system I...
First I've gotta get it workig on the system I know. Then... I can insert code to check what OS it's running on and make the appropreate discisions.

I do have code to make the color work in...
Forum: Programming 02-18-2014
4,155
Posted By mph
Don, Thanks for the input. Sorry, I...
Don,

Thanks for the input. Sorry, I should have been more specific. case 3 "does" print white... because I've only tested this on a tty with black bg and white fg. :) When it is compiled on...
Forum: Programming 02-17-2014
4,155
Posted By mph
Thanks! Never thought about breaking it down...
Thanks! Never thought about breaking it down further. I told ya I haven't programmed in C in years. LOL

I've got an appointment to get to, but I'll try it tonight.

Case 3: should print in...
Forum: Programming 02-17-2014
4,155
Posted By mph
Passing printf formatting parameters as variables
Hi,

I haven't programed in C in a few years. I have been doing a lot of shell scripting, I.E. not really programming anything heavy. :o

That said, I have a script that gives hourly usage...
Forum: UNIX and Linux Applications 07-23-2010
2,991
Posted By mph
UPDATE!!! I think I've got at least a work...
UPDATE!!!

I think I've got at least a work around. I set samba to be the master browser on the local network. The only way I could get away with it is because it's on it's own network. ...
Forum: UNIX and Linux Applications 07-06-2010
2,991
Posted By mph
It's not listing from all the domains. It IS...
It's not listing from all the domains. It IS trying to reach the other controllers. The problem is that there's no route to some of the servers and others there's no route back to the machine. ...
Forum: UNIX and Linux Applications 07-06-2010
2,991
Posted By mph
cjcox, Thanks for the reply. ...
cjcox,

Thanks for the reply. Unfortunately, allow trusted domains = no is already in the config file. It still tries to hit all the other servers. I increased the ldap timeout and it seems to...
2,152
Posted By mph
date +%l (lower case L)
date +%l (lower case L)
Forum: UNIX and Linux Applications 06-30-2010
2,991
Posted By mph
Stop samba from querying trusted domain servers
Hi,

We've got a samba server running in our DMZ. Our users drag & drop files on it for vendors. Everything was working perfectly until the powers that be decided to build a trust between a...
6,287
Posted By mph
You're absolutely right. Sorry, I use ex instead...
You're absolutely right. Sorry, I use ex instead of sed so much, I start thinking of them as interchangeable, but they're not.

I would have used something like this. Note: AFAIK, this only works...
Forum: IP Networking 06-21-2010
3,451
Posted By mph
I'm not sure if this will work under Linux. I...
I'm not sure if this will work under Linux. I know Cisco routers will do it. Your default route should look something like this.Destination Gateway Genmask Flags Metric Ref...
14,700
Posted By mph
Try something like this. ( echo...
Try something like this.


(
echo "To: $1"
echo "From: $2"
echo "Subject: $3"
echo "$4" ***
) | /PATH-TO/sendmail -t


Replace PATH-TO with the real...
6,287
Posted By mph
Be careful here. From what I'm seeing you're...
Be careful here. From what I'm seeing you're overwriting your passfile file with the changed passwords ONLY. This means anyone who's password wasn't changed is no longer in the passfile.

I'm...
6,928
Posted By mph
I'd use expect. You can get a listing from the...
I'd use expect. You can get a listing from the ftp server manipulate it as you see fit to get the parent directory, cd into it, and create the desired directory.

Before you ask... man expect. ...
4,789
Posted By mph
After retrieving you values from the file. You...
After retrieving you values from the file. You can compare the date values with something like this:
compvalue=`date -s "2010/05/05" +%s`
That will convert it to seconds. The highest value wins!...
1,088
Posted By mph
You forgot to do the do for file in *.txt;...
You forgot to do the do

for file in *.txt; do des=$(echo $file | sed -e 's/\.txt//'); mv "$file" "$des"; done
1,803
Posted By mph
This may not help much as far as Appworx goes but...
This may not help much as far as Appworx goes but it should help with parameters (arguments).

insert this into a shell script, then use it with your 10 parameters.
#!/bin/ksh
cmd=`echo $*`
echo...
3,274
Posted By mph
You could also use basename. basename...
You could also use basename.

basename "/aaa/bbb/ccc"
or to put it in a variable
filename=`basename "/aaa/bbb/ccc"`
Forum: UNIX and Linux Applications 12-16-2009
1,380
Posted By mph
Using a queried value to query... I think.
Hi,

One of our FTP servers is constantly under attack. I'm putting the output from the servers log file into a database. What I'm doing now is querying for anything hitting the server on port...
Forum: Programming 07-10-2009
1,663
Posted By mph
Change Directory was in there. I forgot to list...
Change Directory was in there. I forgot to list it.

As far as the others. There was noting in ANY of the examples I found about those.
This is why I ask.

THANKS!!! I'll have to read up on...
Showing results 1 to 25 of 82

 

Featured Tech Videos

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