473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Basic Bash Help?

9
I'm new to bash, only been doing it a day or so, but having some trouble with one thing. I am trying to create a script that checks for updates, places them into a file, slightly formats them, then emails them. It's the latter I'm having trouble with, I have copied an email tutorial and doesnt want to work. Here is my code, I know its not the most efficent but it's actuly the first script I've done. sure it's something simple that I cant see but hoping someone else would know

Expand|Select|Wrap|Line Numbers
  1. #!/bin/bash
  2. vzupdate -m batch list > maybe.txt
  3. grep 3 maybe.txt > maybe2.txt
  4.  
  5. subject="subject"
  6. email="barron@line3.co.uk"
  7. emailmessage="maybe2.txt"
  8. echo"email:">$emailmessage
  9.  
  10. /bin/mail -s "$subject" "$email"<$emailmessage
Any help would be great, cheers
Jul 27 '07 #1
0 1141

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Phil Powell | last post by:
I'm sorry but I can't figure out how to explain this any better than this. In PHP we have a command "require()" that obtains a file and logically places it into another file. I cannot figure...
54
by: seberino | last post by:
Many people I know ask why Python does slicing the way it does..... Can anyone /please/ give me a good defense/justification??? I'm referring to why mystring gives me elements 0, 1, 2 and 3...
3
by: William Park | last post by:
I'm very excited to announce shell interface to GTK+2 (2.6.1) for Bash. It read XML syntax describing the widget layout, and returns user selection as shell variable or runs shell command as...
11
by: Magnus Jonneryd | last post by:
Hi, I'm planning on writing a program that interactively is fed input via a shell (bash). I also want to be able to write a shell script that executes various commands related to my program. In...
5
by: WantedToBeDBA | last post by:
Hi Friends, I want to know some basics in DB2.I am new to DB2. Help me out friends. I am working in Windows 2000(Client). Server running on AIX box. Version :8.1 ESE 1. In oracle we can set...
7
by: chakkaradeepcc | last post by:
HI all, How to execute bash scripts from python (other than using os.popen) and get the values that those bash scripts return. I would be happy if someone could help me out in this.. thanks...
16
by: John Salerno | last post by:
Hi all. I just installed Ubuntu and I'm learning how to use the bash shell. Aside from the normal commands you can use, I was wondering if it's possible to use Python from the terminal instead of...
4
by: melmack3 | last post by:
Hello My PHP script executes many bash/cmd commands. Functions like "exec()" or "system()" cause that new bash/cmd session is started, the command is executed and the session is closed....
1
by: James Mills | last post by:
On Wed, Oct 22, 2008 at 10:32 AM, gita ziabari <gitaziabari@gmail.comwrote: The only possibility is to use the subprocess module and this is a more general problem, one involving the invocation...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.