ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Someone created a script at my work - trying to get this thing to run in cron every night instead of somone manually running it - the issue is when it runs from cron, it cuts off the bottom of the output

my thought was to create a seperate script, and then run it out of cron - but for some reason it still not running correctly, it cuts off the bottom of the output

How did you go from a bash script in your first post to a perl script in the previous post? Maybe I wasn't clear enough: The line I gave is for your bash script, not perl.

You don't need to change the permissions on .profile (should be 640 or 644).

A bit more info:
When you run from cron, no environment is set (only the bare basics). By parsing your .profile (or .bash_profile) you can set the environment 'manually'. The line I gave checks to see if the script (bash script) is run from cron or a terminal (tty). If it's run from cron, it parses .profile and your environment variables are accessible. You probably need some Oracle related variables that are present in your 'normal' (read: terminal) environment.

How did you go from a bash script in your first post to a perl script in the previous post? Maybe I wasn't clear enough: The line I gave is for your bash script, not perl.

You don't need to change the permissions on .profile (should be 640 or 644).

A bit more info:
When you run from cron, no environment is set (only the bare basics). By parsing your .profile (or .bash_profile) you can set the environment 'manually'. The line I gave checks to see if the script (bash script) is run from cron or a terminal (tty). If it's run from cron, it parses .profile and your environment variables are accessible. You probably need some Oracle related variables that are present in your 'normal' (read: terminal) environment.

Hope this clears things up a bit.

yea sorry it may be confusing - but i very much appreciate the help

i have a perl script that i did not write. it works when ran from the command promt.

what i want to do with it is, automate it and email the output

so i wrote shell script that one, runs the perl script, puts it to an outfile, and then two emails it

i think my issue is the perl script just running in cron will not give the full output.

Have i confused you yet.

also, i tried putting this command in my shell script - "/home/.profile" i changed the permission and verified i could run this