Red Hat / Fedora :: Shell Command Redirect To E-mail?

Apr 6, 2010

Is it possible to create a shell script that will run a shell command and email the results?

View 2 Replies


ADVERTISEMENT

General :: Redirect Output Of A Command To Another File Inside Shell Script?

Aug 26, 2010

I am writing a script in which I am using AWK to append to a line in a file and save the file. The command I am using is:

Code:
awk '{s=$0; if ( NR==4 ){s=s ":/usr/java/jdk1.6.0_19/bin" } print s;}' $appName > $appName.new

[code]...

View 4 Replies View Related

Programming :: Bash Ambiguous Redirect - Redirect One Command Output Which Will Be Treat As A Content Of File For Another Command?

Mar 9, 2011

I am trying to grep multiple numbers from file, grep does have the -f option for that.

Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with

Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?

View 2 Replies View Related

General :: Make A Shell - Using Mail Command DestMail= Cat

Jul 22, 2011

I have a problem to make a shell, using mail command DestMail= cat /opt/scripts/maillist.txt mail -s"SUBJECT" $DestMail -- -r xxxxx@gmail.com < /opt/scripts/test.txt where: maillist.txt contain email adresse separated by comma test.txt mail text this script can eval DestMail variable!!

View 1 Replies View Related

Networking :: Send E-mail From Command Line By Using "mail" In Fedora?

Jul 13, 2010

I am trying to send e-mail from command line by using "mail" in fedora. It goes to e-mail server in the same network but it is refused by other outside this network with message: "..... Connection refused by name@yahoo.com ......

View 1 Replies View Related

General :: E-mail Redirect And Port Change?

Sep 24, 2010

I am looking to set up a system that will bring in an e-mail on a port like 4082 then sent it out to a standard e-mail port. this is a fire wall issue. I am looking for the best software I can use on an Ubuntu-Desktop platform to accomplish this and an idea on how to set this up?

View 6 Replies View Related

Programming :: Redirect Output To Files Using Shell?

May 21, 2011

I have a huge database of students, I would like extract these data and write to individual file for each students.

I am running a loop in shell program (.sh file), the output of each run in the loop need to redirected to a file with variable name.

I tried the following line, but it did not work, where BodyMsg is the data and Rollno is the students roll number.

echo $BodyMsg > $RolNo".html"

View 5 Replies View Related

Programming :: Shell Script - Redirect Output To File

Sep 6, 2010

I did a select on my db and now I need that this if consult return true for me salve the columns information in file. How I do this in Shell?!

View 3 Replies View Related

Server :: Redirect / Forward Mail To Another User From Specific Address?

Jun 30, 2009

I wish to intercept/forward emails that is sent to one user on multi user mail server.I only want email from one specific address or group,to be redirected and it will be redirected to another user on same server.The email should not arrive in original users inbox.".forward" file can not give me such solution,because ".forward" file will forward all mails to another specific mail id,which i don't want. I want only specific users mails onto another local user.Is this possible in sendmail?Anybody have clear idea of "virtusetable" & "aliases" file?

View 1 Replies View Related

Server :: Send Mail From Unix Mail Command To Yahoo-id With Attachment?

Feb 15, 2010

i want to send mail from unix mail command to my yahoo-id with attachment, but i want to receive it as attachment.

View 1 Replies View Related

Server :: Configure Mail With Postfix & Cyrus-imap - Cannot Send Mail Through Command Line

Nov 19, 2010

I'm running SUSE linux Server version 11. I want to configure mail server with postfix & cyrus-imap. For that, i have read many documents in Internet by i met issues. I'm running DNS in this server & it's ok Now I cannont send mail through command line.

[Code]....

View 9 Replies View Related

Fedora Installation :: Bash Shell Could Not Find Kfontview Command

Apr 5, 2009

Bash shell could not find "kfontview" command, although kdebase-4.2.1-2.fc10.i386 already installed?

View 2 Replies View Related

General :: Redirect Output From Dd Command?

Apr 7, 2010

How to redirect output from dd command to /dev/null ?

View 2 Replies View Related

Fedora Installation :: Acer Laptop Hot Key Drivers (shell: Command Not Found)

Jan 15, 2009

I'm running Fedora 10 [KDE] on an Acer laptop and am having problems configuring "hot keys" for it. First thing that needs to be mentioned is that the hotkeys used to work when I was running it on Gnome without me having to do anything. I assumed that this will be the case with KDE too. In any case, I think driver installation is supposed to be quite straight forward. There are two packages: acer_acpi and acerhk and different installation instructions for each one of them. The problem I am having is when I run the makefile script for either one of these, I get the following output in the terminal:

Quote:
Makefile: line 5: KERNELSRC?=/lib/modules/2.6.27.9-159.fc10.x86_64/build: No such file or directory
Makefile: line 6: KERNELSRC: command not found
Makefile: line 6: KERNELSRC: command not found
Makefile: line 6: shell: command not found
Makefile: line 6: shell: command not found
Makefile: line 8: KERNELVERSION: command not found
[Code].....

I think build-essential and some other packages are normally needed, but since you can't get them for Fedora (?), I groupinstalled "Development Tools" and some other group.

View 4 Replies View Related

Red Hat / Fedora :: Bash Script To Monitor Server Load / Mail From Command Line

May 4, 2010

I am attempting to write a very basic script that monitors a server's load and automatically emails an administrator upon the load reaching a certain threshold...

1.) `uptime | awk -F ' ' {'print $10'} | cut -d ',' -f1 | awk -F '.' {'print $1'}` -- the output from this command results in a decimal figure, so when that value is parsed and placed in an if statement, the value is not seen as a number. load-monitor.sh: line 9: [: 4.96: integer expression expected/How can I allow a number like "4.56" to be seen as an actual number within the if statement and be compared to 4, for instance?

2.) I am running a cPanel server on CentOS 5.4 -- when I run mail -s "SUBJECT" $EMAILADDRESS the command just hangs, and stracing the process shows it stuck on a read syscall.

3.) If I wanted to write this script in PHP, I have one primary confusion -- how can I mimic the functionality of obtaining the output from uptime via awk, etc. so that I can determine what the server load is at a given time? Which PHP function(s) would assist in that regard?

View 5 Replies View Related

Fedora Installation :: Boot - Grub Drops Into Its Minimal Shell And Gives A Command Line

Jun 12, 2009

I'd like to say I'm very impressed with Fedora 11. I'm a long time Linux user and I've tried many distros. But, I usually keep only the best on my laptop. For a long time that was Ubuntu but, I think Fedora 11 has made some key improvements over Ubuntu and I'm eager to switch. The problem is: I haven't been able to run Fedora as anything other than on the Live CD. Everything works perfectly and it installs but, when I reboot, Grub begins. Instead of booting, however, Grub drops into its minimal shell and gives me a command line.

I've tried installing it a number of ways now and have read much about the problems with Ext4 on Grub and took special care to see that Grub has its own, separate, /boot ext3 partition. Even then, no luck. My hardware should work fine. I've got an HP DV-5 with 4GB RAM, AMD Turion 64-bit dual-core @ 2 Ghz, and an IDE 250GB hard drive. I'm working with the 64-bit Fedora 11 Live disc with KDE as the Gui.

View 10 Replies View Related

General :: Use '{}' To Redirect Output Of A Command Run Through Find's -exec Option?

Jan 10, 2011

I am trying to automate an svnadmin dump command for a backup script, and I want to do something like this:

find /var/svn/* ( ! -name dir -prune ) -type d -exec svnadmin dump {} > {}.svn ;

This seems to work, in that it looks through each svn repository in /var/svn, and runs svnadmin dump on it.

However, the second {} in the exec command doesn't get substituted for the name of the directory being processed. It basically just results a single file named {}.svn.

I suspect that this is because the shell interprets > to end the find command, and it tries redirecting stdout from that command to the file named {}.svn.

View 2 Replies View Related

General :: Redirection - Redirect The Output Of A Program To The Diff Command?

Jan 13, 2011

I have a program that writes to stdout. Is there a way that I can redirect the output to the linux diff command or do I have to write the output to a file and then compare that. For example I have a bunch of test input files for a program and the corresponding expected output in another set of files. And I'd like to do something like ./program < t1.input | diff t1.expected.

View 3 Replies View Related

Programming :: Show The Output Of Shell Command Into A Textbox, Ex Ps -efc Command?

Oct 20, 2010

I am using gtk to program GUI. How can I show the output of shell command into a textbox, ex ps -efc command ?

View 3 Replies View Related

General :: Exit Mail In Shell Script

Feb 15, 2010

I have a shell script that creates a file and at the end I want to mail the contents of the file to myself or a group.

Here is what I have but I the script halts and I have to hit <ctrl-d> the n I receive an EOT and the mail is sent.

What I need:
- how to terminate the mail to where is terminates automatically
- can I cat the file contents instead of using -a

View 1 Replies View Related

Server :: Sending Mail From Shell Script?

Jul 5, 2011

I tried the command echo "Test" | mailx -s "Test subject" reciever@test.com -- -f Tester@gmail.com

But in the mailbox of reciever, i can find the sender name as Tester@gmail.com. My requirement is to show the sender as 'Tester' alone, without the domain name.

View 3 Replies View Related

Fedora :: Unable To Reset Using Either The Reset Option In Gnome Shell Or The Command Using A Terminal?

Jun 3, 2011

I'm unable to reset using either the reset option in gnome shell or the command using a terminal. When I select it the shell exits and displays the graphic "exploding" and then it just sits there. Shutdown works fine; just no reset. Any ideas? I've installed from the DVD. I booted the live CD and it resets just fine so I know it's no my hardware

View 1 Replies View Related

General :: Shell Script With Java Which Check The Disk Space And Send Mail To Id?

Jun 14, 2010

i want to write the script which check the disk space of linux server and send me the disk space details and mail me on my id.

View 2 Replies View Related

Fedora Installation :: Newaliases - Root's Mail Is Not Showing Up In My Local Mail Inbox ?

Jun 14, 2009

I just added my login id to /etc/aliases to forward root's local e-mail to my local e-mail account in evolution.

As always, when I make a change to /etc/aliases, I run newaliases. I now get the following, and root's mail is not showing up in my local mail Inbox:

Code:

Is this correct?

I understand my hostname (i.e., Eng-Lab-010) is not a fully qualified host name, but I never had a problem before. But it appears this not a good thing. What should I do?

View 4 Replies View Related

Fedora :: Unable To Connect From Clients Computers To Mail Server For Receiving Mail?

Oct 15, 2009

I have installed F11 on my server bythis article! I have problem with certificatewhen I connectin from clients computers to my mail server for reciving mail! I have warning like this

View 2 Replies View Related

Software :: Redirecting APT Cache - Can Redirect Cache Of Apt To A Specified Folder Either On Command Line Or Via A Config Setting?

Jan 5, 2011

I was laughing about klackenfus's post with the ancient RH install, and then work has me dig up an old server that has been out of use for some time. It has some proprietary binaries installed that intentionally tries to hide files to prevent copying (and we are no longer paying for support or have install binaries), so a clean install is not preferable.

Basically it has been out of commission for so long, that the apt-get upgrade DL is larger than the /var partition (apt caches to /var/cache/apt/archives).

I can upgrade the bigger packages manually until I get under the threshold, but then I learn nothing new. So I'm curious if I can redirect the cache of apt to a specified folder either on the command line or via a config setting?

View 2 Replies View Related

Fedora :: Stuck With Bash Shell / Changing Default Shell To Tcsh?

Mar 14, 2010

I want to change my default shell to tcsh. I used

Code:
usermod -s /bin/tcsh username
command as given at url

But if I open a new shell, it is still a bash shell.

How do I make my default shell as tcsh?

View 6 Replies View Related

Software :: How To Use Mail Command

Nov 3, 2010

how can i use mail command? i mean i know its syntax and its options but when i try to send an email from my console to a hotmail account of mine i get nothing. do i have to set a mail server or something? and if so where can i find some more info?

View 4 Replies View Related

General :: Run A Shell Command With &?

Jun 15, 2010

I am using Red Hat Linux Enterprise version 5. I've noticed people sometimes running commands with a couple of & options. For example, in the below command, there are two & signs. What is the purpose of them? Are they always used together with nohup?

nohup foo.sh <script parameters> >& <log_file_name> &

View 6 Replies View Related

Debian Programming :: How To Use Shell Command

Sep 6, 2013

How to use shell command?

installs.sh:

Code: Select allapt-get install icedove-l10n-hu
apt-get install rar
apt-get install ...
...
y press key or other language is other key. hungarian key is: i

english after apt-get install in gnome-terminal: (y)es or (n)o
hungarian after apt-get install in gnome-terminal: (i)gen or (n)em

How to yes or no automatically in all languages? Not manual, not 'Y'/'I' or 'N'/'N' keydown.

I would like use this script my fresh installed Debian 7.1. I would like run this install.sh when Debian is installed for my all softwares when i would like use.

10 PC installing easy and faster my script.

If no script is slowly install for my 10 PC.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved