Posts
 
Reputation
Joined
Last Seen
Ranked #313
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
88% Quality Score
Upvotes Received
9
Posts with Upvotes
9
Upvoting Members
6
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
10 Commented Posts
0 Endorsements
Ranked #351
~74.3K People Reached
About Me

Unix/Linux Administrator

Interests
writing, computers, guitar
Favorite Tags
Member Avatar for skelly16

Hey There, You may just need to remove one argument from your uuencode line so [QUOTE]/usr/bin/uuencode $file.Z $file.Z | /usr/bin/mailx -s "Report for COB $YESTERDAY" "joe.blogs@hotmail.com"[/QUOTE] becomes [QUOTE]/usr/bin/uuencode $file.Z | /usr/bin/mailx -s "Report for COB $YESTERDAY" "joe.blogs@hotmail.com"[/QUOTE] you can also user tar and gzip (if you have the Gnu version …

Member Avatar for Chezi_1
0
3K
Member Avatar for supra

If you're interested in building an OS, you should also get into c and c++ programming. If you look around hard enough you can find lots of good tutorials. A lot of times, even O'Reilly books show up online on overseas .edu sites. Good luck :) , Mike

Member Avatar for peter_14
0
800
Member Avatar for subhashmedhi

Hey There, You can also try [ICODE]HELO whateveryourdomainis.com[/ICODE] and see if the mailserver isn't just dishing you for not identifying your origin. or try [ICODE]EHLO ..etc, etc, etc[/ICODE] and, like omrsafetyo mentioned, you'll probably need to authenticate. Best wishes, Mike Maybe, maybe not.[QUOTE=subhashmedhi;648762]But if i use the following code [code] …

Member Avatar for Tabsy
0
2K
Member Avatar for dave_nithis

a's got 100 b's got 9 you need the 91 uniques - I'll put 'em in c.txt [CODE]while read line do grep $line b.txt >/dev/null 2>&1 if [ $? -ne 0 ] then echo $line >>c.txt fi done <a.txt[/CODE] Sorry - just needed to drop a post somewhere - it's …

Member Avatar for laksh.ss
1
111
Member Avatar for inthespotlite82

Hey There, What you're trying to do is possible, if you use a program like "expect" to pass your password interactively (well, mock-interactively ;) to ssh and/or scp. However, your downside security wise would be much steeper than setting up dsa keys and strict trust (user@ip, etc). Are you avoiding …

Member Avatar for masijade
0
752
Member Avatar for sjgriffiths

You can also "cut" out the first field before you sort, if you want :) , Mike

Member Avatar for JeoSaurus
0
273
Member Avatar for egmik3

Hey There, You should be able to do this with vi (assumming your EDITOR environment variable is set to vi). First, check out this article on how to "really" insert control characters into your scripts (like ^H backspace rather than a ^ symbol followed by a capital H): [url]http://linuxshellaccount.blogspot.com/2007/10/how-to-really-represent-control.html[/url] Then, …

Member Avatar for gunasek12
0
7K
Member Avatar for programmer321

Hey there, If you're interested, just for kicks, here's the long convoluted way to do it :) [url]http://linuxshellaccount.blogspot.com/2008/01/unix-and-linux-shell-script-to-remind.html[/url] Cheers, Mike

Member Avatar for cfajohnson
0
3K
Member Avatar for toronto

Hi there, It's probably expecting a reply to the password: prompt from su. You can make it all one line and get away with it, but you'd still have to enter 3 passwords (assuming you're not su-ing postgres as root) - one for the su - one for the createuser …

Member Avatar for masijade
0
989
Member Avatar for MONITORING

Hey There, Your getting the result from the backticks is valid. I can't be sure about the mysql() function that you're referencing though. Can you post that? Thanks, , Mike

Member Avatar for reibi
0
146
Member Avatar for wiz83

You're pretty much there. I usually use sendmail, so pardon the substition. I think it's either output redirection or the mail command, but this should work (assuming your command works when run at the command line!) [CODE]37 01 24 1 * (echo "Subject: file compare output";/usr/local/bin/perl /tpf106/data2/cis_web/cis3/cis3.11/work/rishi/s-branch/perl1/perl/compare.pl 2>&1)|/usr/lib/sendmail rishi83@yahoo.in[/CODE]

Member Avatar for chongopants
0
210
Member Avatar for bswapnil

Hey There, This link probably answers all of your questions. Just pick the compiler you'll be using to build the package and they should have it listed (if not, use yum or apt-get to grab it and all it's dependencies) [url]http://opencvlibrary.sourceforge.net/CompileOpenCVUsingLinux[/url] Happy building :) , Mike

Member Avatar for mahah327
0
147
Member Avatar for jchilley

Hey There, I think the easiest thing, and which might cut out some other problems for you, is to source the environment (user or global) into the script. For instance: #!/bin/ksh . /etc/profile # Read in the system profile . /home/user/.profile # read in the users profile That way you're …

Member Avatar for Fernando3
0
1K
Member Avatar for rajenpandit

Hey there, If you're doing this for C, you can just use quotes instead of the angle brackets, like [CODE]#include "/home/yourdir/myInclude/header.sh"[/CODE] If you're using a shell and your includes are functions, you can put them in your .profile, as advised above or just create your header.sh file and source it …

Member Avatar for rajenpandit
0
128
Member Avatar for leoman

Hey There, You can try piping everything to sendmail -t (mail and mailx use sendmail). The -t flag means you have to specify headers, though, so: [CODE](echo "Subject: My Subject";echo "From: my@address.com";echo "To: your@address.com";echo "Reply-To: my@address.com";echo "X-Whatever: Any Other Headers You Want To Include";echo CONTENT;cat FILE)|/usr/lib/sendmail -t[/CODE] sendmail might be …

Member Avatar for KlementHonza
0
2K
Member Avatar for iggy78

Just so you know, they strongly discourage putting homework or work requests up oh this board. I don't run it; just thought you should know. That being said, all the other boards are dead, so : [CODE]#!/bin/ksh echo `uname -a` >>file.txt echo `hostname` >>file.txt echo $LOGNAME >>file.txt ls -d * …

Member Avatar for anonymoose09
0
123
Member Avatar for chris5126

Hey Chris, It looks like just a simple typo in Aia's reply. Just change $8.2f to %8.2f and you should get "1.20" , Mike

Member Avatar for Aia
0
222
Member Avatar for yhcheong

Hey there, You could use the output of netstat and pipe that to a line count. Something like: netstat -an |grep "[2]3"|wc -l althought that might give you some false positives and you should echo the statement if you want to dump the out in a variable, since wc will …

Member Avatar for Comatose
0
1K
Member Avatar for rman10

Hey Richard, For both of those, you can capture the output of your test commands using backticks (will work in any shell) or the $() test in bash For instance, you could take your statement: [QUOTE]ps -ef | awk '/Cpu/ {if ($2 > 50 ) print "exceed"}'[/QUOTE] and assign it …

Member Avatar for eggi
0
164
Member Avatar for lehe

Hey there, Sometimes it will work if you just replace your exec call with a simple direct call, so instead of: [QUOTE]exec $SHELL[/QUOTE] just do [QUOTE]$SHELL[/QUOTE] <-- Since you're not exec'ing (i.e. replacing the current process with your new process, you shouldn't get the session timeout error since you'll just …

Member Avatar for eggi
0
163
Member Avatar for egmik3
Member Avatar for eggi
0
137
Member Avatar for JimD C++ Newb

Hey There, Also, at the end of your code if you change: [CODE]echo "${name}:${phone}:${address}" >> addressbook.txt[/CODE] to [CODE]echo "${name}:${phone}:${address}" > addressbook.txt[/CODE] should inline replace the file. Hope that helps :) , Mike

Member Avatar for eggi
0
388
Member Avatar for k2k

Hey There, You're probably running into an issue with -p if you're just using a plaintext password. It expects the password to be encrypted using the crypt program (apologies if my assumption is incorrect. One thing I was thinking was that it might be easier to create the script to …

Member Avatar for eggi
0
142
Member Avatar for chris5126

Hey There, You coud use the output of format, although if you wanted to automate, you'd have to pipe the right commands to it and then do some processing on the other end, eg, for disk 0: [QUOTE](echo 0;echo p;echo p)|format[/QUOTE] The partition print shows size in MB - You …

Member Avatar for chris5126
0
161
Member Avatar for gornhorse

Hey there, Just in case you have to do it the second way, this form works in bash 3.x (possibly earlier versions) and avoids the variable scoping problem while maintaining the integrity of the command you were feeding to the pipe. [CODE]while read j1 j2 j3 j4 fsize j5 j6 …

Member Avatar for eggi
0
150
Member Avatar for madurai07

Hey there, I'm sure what you're shooting for but, maybe: [CODE]LOG=${PROCS}.log $LOG "0"[/CODE] or [CODE]echo "0" >>$LOG[/CODE] Other than that, I'll need more specifics. Best wishes, Mike

Member Avatar for eggi
0
154
Member Avatar for glamiss

Hey there, If you're running syslog-ng, look into that. It has a history of doing exactly what you're experiencing. Otherwise, since you know this action is recurring (something is chmod'ing your /dev/null) you could just run this in cron with one line and just "assume" the permissions have been changed. …

Member Avatar for eggi
0
141
Member Avatar for number87

Hey There, Two things, I think: 1. You're not stripping the literal dollar sign from the figures you're trying to add 2. Since you're invoking awk twice, you need to include your BEGIN def's twice If you change the last line of your function to: [CODE]sed 's/\$//' $dataFile|awk 'BEGIN{FS=","; RS="\n"} …

Member Avatar for Salem
0
148
Member Avatar for rgy

Hey there, Just a word of practical advice. If you really "need" a solution and don't have time to wait for someone else to take of their own time to help you with your problem, try doing a search on google for something like: [QUOTE]script to remove extension from filename[/QUOTE] …

Member Avatar for cfajohnson
0
156
Member Avatar for tondeuse34

Hey There, It might have to do with the user agent string that wget passes to the site (I think it's something like wget-version). You can manipulate the --user-agent= variable to pass anything, just be careful that you don't use Mozilla as they're litigation happy (more details on the options …

Member Avatar for eggi
0
105