Sponsored Content
Top Forums Shell Programming and Scripting script to pull info from my email? Post 302303287 by xinix on Thursday 2nd of April 2009 09:38:19 AM
Old 04-02-2009
I tried the suggested command and didn't get any output, but it got me on the right track. So, thank you very much.
It was the ^ that I was missing.
Code:
awk '/^Name Of Place/ {print $4,$5,$6}' testfile

This gives me the date and time info.

At least now I know how to get the data I need from a testfile. Next I need to figure out how to get it from my inbox. This shouldn't be too tricky as I'm guessing that there are quite a few posts in this forum that deal with email inboxes.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Email the changed info in the file

Hey Guyz Just need some help regarding this.I need to send an email(sendmail) to group of users, when ever the content in a file e.g abc.txt changes.We need to send the changed content in the email.We are using bash here.Thanks for your help Guyz --CoolKid (1 Reply)
Discussion started by: coolkid
1 Replies

2. UNIX for Dummies Questions & Answers

Pull a file from a remote server through a shell script

Hi, I am writing a shell script to pull a file from a remote server (Let say its a windows based remote server). One of my criteria is to pull a file only if it is not empty. We have done a similar script to push a file from our end to a remote server and before pushing it we check for the... (2 Replies)
Discussion started by: sashankkrk
2 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Please list email ids or contact info of members

Hi , Is it possible to list the user's email id for further communication. Thanks, MoonwalaPL (3 Replies)
Discussion started by: moonwalapl
3 Replies

4. Shell Programming and Scripting

How to pull info under headers in file(awk,grep,while loop)

below is an extract from my file and I am trying to use Awk and grep and a while loop to pull infomation from under neath "HBA WWN=".HBA WWN=" reoccurs all over the file but the 100000c.....number are unique and I want to be able to pull and reference specifi information under this header ever time... (2 Replies)
Discussion started by: kieranfoley
2 Replies

5. Shell Programming and Scripting

Need script to pull multiple field from log file

I am hoping to get some help with a script to pull certain fields from a log file. User update (xx6xxx P) rpt (yy6yyy B) 2010/01/20 21:36:01.298 Remote client forward start streamid 85af 2010/01/20 21:36:01.307 rpt2 (ZZ6ZZZ G) rpt1 (YY6YYY B) urcall (CQCQCQ ) mycall (W1AW) user... (5 Replies)
Discussion started by: TedSD
5 Replies

6. Shell Programming and Scripting

Please do help: Perl Script to pull out rows from a CSV file

I have CSV file that contains data in the format as shown below: ABC, 67, 56, 67, 78, 89, 76, 55 PDR, 85, 83, 83, 72, 82, 89, 83 MPG, 86, 53, 54, 65, 23, 54, 75 .. .. .. .. I want to create a script that will pull out the rows from the above sheet and paste it into another CSV file.... (12 Replies)
Discussion started by: pankajusc
12 Replies

7. Shell Programming and Scripting

Script to pull hashes out of large text file

I am attempting to write a script that will pull out NTLM hashes from a text file that contains about 500,000 lines of data. Not all accounts contain hashes and I only need the ones that do contain hashes. Here is a sample of what the data looks like: There are thousands of other lines in... (6 Replies)
Discussion started by: chango77747
6 Replies

8. Shell Programming and Scripting

Bash Script to pull ipa server name on 500 servers

Hello All, I need help writing a bash script that will run on 500 LINUX servers and do the following: 1. Capture the ipa_server name from /etc/sssd/sssd.conf on a list of 500 servers in the ipahosts file. 2. Write to a file outputing only server name and IPA server name. Root ssh keys... (3 Replies)
Discussion started by: vtowntechy
3 Replies

9. Shell Programming and Scripting

Shell script to pull certain fields

I/m a beginner so be easy. I have text files that live on an AIX server. The files come in and I've been charged with writing a shell script to email out that pulls the first date, and the last date of the file. I need to load these 2 dates into 2 separate variables. I can figure out the variables,... (13 Replies)
Discussion started by: mattadams1983
13 Replies

10. Shell Programming and Scripting

Generic script to recursively cd into directories and git pull

Hi all, I'm trying to write a script to recursively cd into my Git projects and pull them, and will later expand it to build my projects as well. I'm having a bit of trouble with my current script, as I want to supply a command line argument to tell it which branch to check out. I can hard... (2 Replies)
Discussion started by: Cows
2 Replies
ensemble(n)							    [incr Tcl]							       ensemble(n)

__________________________________________________________________________________________________________________________________________________

NAME
ensemble - create or modify a composite command SYNOPSIS
itcl::ensemble ensName ?command arg arg...? or ensemble ensName { part partName args body ... ensemble partName { part subPartName args body part subPartName args body ... } } _________________________________________________________________ DESCRIPTION
The ensemble command is used to create or modify a composite command. See the section WHAT IS AN ENSEMBLE? below for a brief overview of ensembles. If the ensemble command finds an existing ensemble called ensName, it updates that ensemble. Otherwise, it creates an ensemble called ensName. If the ensName is a simple name like "foo", then an ensemble command named "foo" is added to the current namespace context. If a command named "foo" already exists in that context, then it is deleted. If the ensName contains namespace qualifiers like "a::b::foo", then the namespace path is resolved, and the ensemble command is added that namespace context. Parent namespaces like "a" and "b" are cre- ated automatically, as needed. If the ensName contains spaces like "a::b::foo bar baz", then additional words like "bar" and "baz" are treated as sub-ensembles. Sub- ensembles are merely parts within an ensemble; they do not have a Tcl command associated with them. An ensemble like "foo" can have a sub- ensemble called "foo bar", which in turn can have a sub-ensemble called "foo bar baz". In this case, the sub-ensemble "foo bar" must be created before the sub-ensemble "foo bar baz" that resides within it. If there are any arguments following ensName, then they are treated as commands, and they are executed to update the ensemble. The follow- ing commands are recognized in this context: part and ensemble. The part command defines a new part for the ensemble. Its syntax is identical to the usual proc command, but it defines a part within an ensemble, instead of a Tcl command. If a part called partName already exists within the ensemble, then the part command returns an error. The ensemble command can be nested inside another ensemble command to define a sub-ensemble. WHAT IS AN ENSEMBLE
? The usual "info" command is a composite command--the command name info must be followed by a sub-command like body or globals. We will refer to a command like info as an ensemble, and to sub-commands like body or globals as its parts. Ensembles can be nested. For example, the info command has an ensemble info namespace within it. This ensemble has parts like info names- pace all and info namespace children. With ensembles, composite commands can be created and extended in an automatic way. Any package can find an existing ensemble and add new parts to it. So extension writers can add their own parts, for example, to the info command. The ensemble facility manages all of the part names and keeps track of unique abbreviations. Normally, you can abbreviate info complete to info comp. But if an extension adds the part info complexity, the minimum abbreviation for info complete becomes info complet. The ensemble facility not only automates the construction of composite commands, but it automates the error handling as well. If you invoke an ensemble command without specifying a part name, you get an automatically generated error message that summarizes the usage information. For example, when the info command is invoked without any arguments, it produces the following error message: wrong # args: should be one of... info args procname info body procname info cmdcount info commands ?pattern? info complete command info context info default procname arg varname info exists varName info globals ?pattern? info level ?number? info library info locals ?pattern? info namespace option ?arg arg ...? info patchlevel info procs ?pattern? info protection ?-command? ?-variable? name info script info tclversion info vars ?pattern? info which ?-command? ?-variable? ?-namespace? name You can also customize the way an ensemble responds to errors. When an ensemble encounters an unspecified or ambiguous part name, it looks for a part called @error. If it exists, then it is used to handle the error. This part will receive all of the arguments on the command line starting with the offending part name. It can find another way of resolving the command, or generate its own error message. EXAMPLE
We could use an ensemble to clean up the syntax of the various "wait" commands in Tcl/Tk. Instead of using a series of strange commands like this: vwait x tkwait visibility .top tkwait window . we could use commands with a uniform syntax, like this: wait variable x wait visibility .top wait window . The Tcl package could define the following ensemble: itcl::ensemble wait part variable {name} { uplevel vwait $name } The Tk package could add some options to this ensemble, with a command like this: itcl::ensemble wait { part visibility {name} { tkwait visibility $name } part window {name} { tkwait window $name } } Other extensions could add their own parts to the wait command too. KEYWORDS
ensemble, part, info itcl 3.0 ensemble(n)
All times are GMT -4. The time now is 08:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy