Posts
 
Reputation
Joined
Last Seen
Ranked #314
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
~75.9K People Reached
About Me

Unix/Linux Administrator

Interests
writing, computers, guitar
Favorite Tags

236 Posted Topics

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
802
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
116
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
756
Member Avatar for sjgriffiths

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

Member Avatar for JeoSaurus
0
303
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
1K
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
149
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
226
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
148
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
132
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
125
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
245
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
168
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
166
Member Avatar for egmik3
Member Avatar for eggi
0
145
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
390
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
144
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
169
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
153
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
159
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
143
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
151
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
157
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
108
Member Avatar for amanuensis

Hey There, I am not sure what you want, exactly ;) Let me know if this is close: look through the entire events folder, find all the events subfolders and then gzip everything in those folders and place each gzipped file from each folder next to the corresponding subfolder in …

Member Avatar for eggi
0
138
Member Avatar for Blackeagle

Hey there, Very basicly, it's an integer used to identy an open file in a process. In Unix/Linux/Posix 0, 1 and 2 are generally reserved for STDIN (standard input), STDOUT (standard output) and STDERR (standard error), in that order. The integer (of file descriptor) are required as arguments to read, …

Member Avatar for verruckt24
0
114
Member Avatar for ntman4real

Hey There, Another way to go about it would be to do the math incrementally, within the loop, to avoid any possibility of losing the variables value when you exit the loop due to scope issues. You can do this by using $c as your counter variable, as well, so …

Member Avatar for eggi
0
126
Member Avatar for number87

Also, as Salem pointed out, don't forget to use the preceding $ character when you're extracting values from your variables. Best wishes, Mike

Member Avatar for eggi
0
101
Member Avatar for AlvinRey70

Hey there, 1. [CODE]#!/bin/bash # # your name # your course ls >FILE.txt[/CODE] 2. [CODE]#!/bin/bash # # your name # your course cp -r dir/* newdir/*[/CODE] Don't forget to chmod them at least 700 so they can be executed from the command line. Best wishes, , ike

Member Avatar for moqwen
-1
213
Member Avatar for shyamsantra

Hey There, You can also use "diff -r -y" if your version of diff supports it. This will give you output like: [QUOTE]$ ls a b a: a b c b: a a.gz b b.gz c.gz $ diff -y -r a b diff -y -r a/a b/a Only in b: …

Member Avatar for eggi
0
83
Member Avatar for jinsonsani

Hey There, Just a suggestion. If you're using Gnu Sed, you can use the -i option and it will do the changes inline (basically taking care of writing to a tmp file and then copying back, which Aia had suggested. As Aia noted, it's never a good idea to overwrite …

Member Avatar for eggi
0
169
Member Avatar for mustaine85

Hey there, For scripting in shell, you can just concatenate the two variables [QUOTE]sum="hi " host # number1="there" host # echo $sum hi host # sum="${sum}$number1" host # echo $sum hi there[/QUOTE] Hope that helps :) , Mike

Member Avatar for eggi
0
89
Member Avatar for shouvik.d

How does this work. Does the exe open up an xterm window and just run a command in there or are we looking at a full-blown gui? Thanks, Mike

Member Avatar for Fest3er
0
574
Member Avatar for mustaine85

Not to be cute, but, yes :) As long as you know the format that you'll be entering the birthday's in your files (or multiple formats) you can extract them using any number of tools (sed, awk, etc), convert them into unix time, subtract that from the time right now …

Member Avatar for eggi
0
80
Member Avatar for wmuldoon

Hey there, You could also just slap it all together on one line and forget about the output file. Try this and let me know if I fat-fingered any of it - this should all be one line if it gets split up: [CODE]lsof |grep QuarkXP|awk '{ print $9,$10,$11,$12 ]'|sed …

Member Avatar for wmuldoon
0
254
Member Avatar for serkan sendur

Hey there, I don't know that there's any built-in way to do it, since, when you type the name of a file on the command line (an executable shell script, for instance), if you typed: [QUOTE]./script[/QUOTE] the shell would assume that you wanted to execute the script and would have …

Member Avatar for eggi
0
303
Member Avatar for rhesus303

Hey There, Forgetting about what the "ls" variable evaluates as, it's a pretty simple expression that just looks confusing. It's using expr's ":" string comparison operator. on the left side you have "$ls" which you say equal $0, which is traditionally the command name if you're calling a script. So, …

Member Avatar for eggi
0
231
Member Avatar for confusedGirl

Hey there, What scripting language are you using? Or is that just pseudo-code? Seems to be a mix of a few different kinds and some of the statements may or may not be correct depending on the context. Look forward to your reply. Happy Holidays :) Quit working and relax …

Member Avatar for eggi
0
120
Member Avatar for shouvik.d

Hey There, Unless it's a permissions issue (where you can't delete the folders as the user that runs the batch file) is it possible that you're trying this at the command line as proof-of-concept for the batch file. If you're doing command line testing, although the variable MUST be %%A …

Member Avatar for eggi
0
345
Member Avatar for baudday

If you want to restrict it to certain numberset, just frame floor and ceiling variables. For instance $RANDOM/600 will give you an approximate range of 0 to 60 (or 59, I forget). If you just fool around with that for a while, you should be able to tackle it. My …

Member Avatar for fpmurphy
0
189
Member Avatar for Pender

Hey There, You can catch tabs with sed using escape characters. So far tabs, you could match it with: [QUOTE]s '/test\t/d' <file[/QUOTE] Hope that helps and best wishes, Mike

Member Avatar for eggi
0
163
Member Avatar for chris5126

Hey there, One way to pass variables to awk (so you don't have to use double quotes) is with the -v flag, like [QUOTE]awk -v rBytes1=$rBytes '{......blah,blah,blah...}'[/QUOTE] and then you could use the variable rBytes1 in your script just like any other awk variable. Best wishes, Mike

Member Avatar for Fest3er
0
137
Member Avatar for rusman
Member Avatar for eggi
0
4K
Member Avatar for krammer

Hey there, I can see two places where this script might get you. 1. Since you create parts of some arrays by using the wildcard asterisk (*) you run the risk of creating really long lists which could give you a problem with programs like "rm" which tap out after …

Member Avatar for eggi
0
203

The End.