Sponsored Content
Top Forums Shell Programming and Scripting while read loop w/ a nested if statement - doesn't treat each entry individually Post 302150570 by Perderabo on Tuesday 11th of December 2007 08:30:55 PM
Old 12-11-2007
You can't just do "mailx". mailx wants to read an email. so you need to do something like:
echo fumble | mailx

As it is now, mailx is reading from stdin and thus sucking up the rest of the file from your < ldaplist.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

nested read

I am hoping someone can help me with this one. I am writing a ksh script on Solaris. I want to read in host names and some other info from a file, do an "rsh host 'shutdown'" (or any uname for now until I get it working), and then be given some options. The problem is I am using while read... (2 Replies)
Discussion started by: TioTony
2 Replies

2. Shell Programming and Scripting

Nested while read line loop

Hi, Can anyone please help me: i'm trying to read a file with directory-names , then go to that directory and read another (output) file to perform some tasks per line (second read line in the part of script below). The problem is that after the nested while loop has finished, the first while... (7 Replies)
Discussion started by: Rakker
7 Replies

3. UNIX for Dummies Questions & Answers

Nested If statement within Do / Done

Hi all! I'm really hoping you can help me out here; now i have searched and searched and have at least worked out that you can't have a nested if statement with a 'done' in it (as i have) as you're killing the parent before the child. So here's what i have, and here's hoping someone can help... (2 Replies)
Discussion started by: dalgibbard
2 Replies

4. Shell Programming and Scripting

If-statement nested in case

I'm trying to write case statements with 'if statements' embedded inside of them. I'm using the korn shell but it's not functioning. If I want to see if a string exists in a file and then perform an action, what would be the best way to do this? For file "asg51fin" to delete a line if a... (1 Reply)
Discussion started by: dazeman27
1 Replies

5. Shell Programming and Scripting

Perl nested if statement

I'm just having a bit of trouble running this code. It tells me that there's a syntax error on line 29. Any help appreciated. #!/usr/bin/perl # # Phone Book Application # %phonebook = ( "Wayne", '34687368', "Home", '378643287', "Work", '017374637', "School",... (2 Replies)
Discussion started by: cabaiste
2 Replies

6. Shell Programming and Scripting

Nested While loop doesn't end

Hi, Below is my script in which i am using nested while loop to read two files and move the files to a remote server. My issue is that the 2nd while loop doesn't stop executing and it keeps on executing. Can someone please let me know where i have gone wrong. myFile=$ESER_TEST_FILES ... (2 Replies)
Discussion started by: funonnet
2 Replies

7. UNIX for Dummies Questions & Answers

Read statement within while read loop

hi, this is my script #!/bin/ksh cat temp_file.dat | while read line do read test if ]; then break else echo "ERROR" fi done when i execute this code , the script does wait for the user input . it directly prints "ERROR" and terminates after the no. of times as there... (3 Replies)
Discussion started by: siva1612
3 Replies

8. UNIX for Dummies Questions & Answers

Statement to find if an entry exists in a file

I need to check if an entry input by the user is in a file. If so, I need to run a command, and if it does not exist then it should output entry does not exist. So I have so far... echo "Enter record:" read record //command || //command Can I use an if statement to do this? (3 Replies)
Discussion started by: itech4814
3 Replies

9. Shell Programming and Scripting

How come this if statement doesn't work?

greetings, the following code isn't working as i expect it to. the first dbl brackets do but the second set gets ignored. ie: if i'm on t70c6n229 it echoes "Something" and i expect it not to. what am i missing? if " ]] || " ]]; then echo "Something" fi thanx! (9 Replies)
Discussion started by: crimso
9 Replies

10. Shell Programming and Scripting

awk doesn't understand 'read' statement!!!

While working on awk programming, i found that it doesn't understand 'read' statement. Then what's the use of 'continue' and 'break' statement in awk. For ex: awk '{k=1; while (k<10) {print $0; k++}}' emp.lst Now, please say if I want to put the logic that after priting 1 line, it will ask for... (13 Replies)
Discussion started by: ravisingh
13 Replies
R2E(1)							      General Commands Manual							    R2E(1)

NAME
r2e - receive RSS feeds by email SYNOPSIS
r2e [-d dir] action [options] DESCRIPTION
r2e is a simple program which you can run in your crontab. It watches RSS feeds and sends you nicely formatted email message for each new item. The program is configured by ~/.rss2email/config.py by default. To use a different config file in a different directory, you can specify the -d option before any actions. For a quick start with r2e, try these steps: r2e new your@address r2e add http://feed.url/somewhere.rss r2e run The last command should eventually be put into your crontab, if you want things be sent you automatically. It is possible to use authenticated feeds using the following syntax: r2e add http://user:password@example.com/feed ACTIONS
new [youremail] Create a new feedfile. If the second option is specified, it sets the default email address that mails are sent to. add url [youremail] Subscribe to a feed. The first option is the URL of the feed. The optional second option is the email address to send new items to. Repeat for each feed you want to subscribe to. run [--no-send] [num] Scan the feeds and send emails for new items. This can be run in a cron job. The --no-send option stops r2e from sending any email. This can be useful the first time you run it, as otherwise it would send every available story. If a number is specified, r2e will only download that feed. The list command lists the feed numbers. email yournewemail Change the default email address. list List all your currently subscribed feeds. delete n Delete a feed, using its number from the list command. pause n Temporarily ignore a feed. A paused feed won't be updated at all. unpause n Re-enable updates from a feed. opmlimport url Import feeds from an OPML file. opmlexport Export feeds to standard output, as an OPML file. CONFIGURATION
The program's behavior can be controlled via the ~/.rss2email/config.py config file. The file is a python file, so variables are set using a syntax like this: VARIABLE = "value" If the value is a number, the quotes may be omitted. Most configuration variables in the file are boolean values, where a 1 indicates the option is set, and a 0 disables it. See the example config.py file for a full list of available configuration variables. FILES
~/.rss2email/feeds.dat The database of feeds. Use r2e to add, remove, or modify feeds, do not edit it directly. ~/.rss2email/config.py If this file exists, it it read to configure the program. AUTHOR
Aaron Swartz <rss2email@aaronsw.com> R2E(1)
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy