Search Results

Search: Posts Made By: Jaymoney
4,552
Posted By Jaymoney
Trying that now but can you tell me when people...
Trying that now but can you tell me when people keep referring to profile and cshrc are they talking about the file in each user's home directory? If so then mine is called local.profile and...
4,552
Posted By Jaymoney
No joy i'm afraid. The file was not even created...
No joy i'm afraid. The file was not even created that time
4,552
Posted By Jaymoney
MAKING POST LONGER SO I CAN POST.............. ...
MAKING POST LONGER SO I CAN POST..............

tcsh
4,552
Posted By Jaymoney
When I try to execute the profile file manually...
When I try to execute the profile file manually on the command line I get the export error

I tried making the crontab look like what vgersh suggested but it didn't work. It still runs the script...
4,552
Posted By Jaymoney
Whence whoami: whence: Command not found. ...
Whence whoami:
whence: Command not found.

Which whoami:
/usr/ucb/whoami

With the id command I can only get output from id or id -a

I looked into my home directory and found a local.profile...
4,552
Posted By Jaymoney
Yeah the difference is a lot :) From the...
Yeah the difference is a lot :)

From the cron
HOME=/home/seitjn
LOGNAME=seitjn
PATH=/usr/bin:
SHELL=/usr/bin/sh
TZ=Eire

From the terminal...
4,552
Posted By Jaymoney
Sorry guys I am slowly starting to understand...
Sorry guys I am slowly starting to understand what I need to do. I basically need to make cron do the env command and stick the result in a file so I can see what environment variables IT deals with...
4,552
Posted By Jaymoney
Ok so I found system.env and I see in there: ...
Ok so I found system.env and I see in there:
PATH=/bin:/sbin:/usr/sbin:/usr/ccs/bin

Should I update this to read:
PATH=/bin:/sbin:/usr/sbin:/usr/ccs/bin:/usr/bin

EDIT: Oh never mind. I typed...
4,552
Posted By Jaymoney
Is there a way to actually look at these...
Is there a way to actually look at these variables and see what they are set to?
4,552
Posted By Jaymoney
Supposing all I care about is the /usr/bin...
Supposing all I care about is the /usr/bin directory (assuming that this is the one PERL cares about), can I manually go to this PATH variable and set it = to /usr/bin or are these variables not...
4,552
Posted By Jaymoney
Ok i'm getting that I need to set some...
Ok i'm getting that I need to set some environment variables but what variables are these?
What do I need to set them to and how do I set them (yes this thread is appropriately titled!)

Thanks...
4,552
Posted By Jaymoney
Cron-Noob
Hi guys!

Consider the following PERL script,

#!/usr/bin/perl

my $userID = `whoami`;
open(TMP, ">user.txt");
print TMP "$userID";
close(TMP);

Run on the command line it works no...
2,070
Posted By Jaymoney
Thanks again Gull but still no joy. Literally all...
Thanks again Gull but still no joy. Literally all that happens is this:

user1@server> ./script.pl

running...
running...
running...

Ctrl + c

user1@server>su - user2
password:...
2,070
Posted By Jaymoney
Thanks for the reply Gull. I don't want it to run...
Thanks for the reply Gull. I don't want it to run as the same user all of the time. In fact I need to make sure that it is NOT run as the user that created it (it's a long story).

Anyway can I use...
2,070
Posted By Jaymoney
Script only runs as a particular user
Hi guys

So I've got this PERL script that for one reason or another I need to run as a user other than the user that created the script.
When I su - to another user the script won't run and...
Forum: Programming 05-28-2012
15,418
Posted By Jaymoney
Any particular reason or is it just better...
Any particular reason or is it just better programming?
Forum: Programming 05-28-2012
15,418
Posted By Jaymoney
@in2nix4life Delicious thanks very much. I...
@in2nix4life

Delicious thanks very much. I knew about perl's grep function but never perceived $_ as a list! duh... :p
Forum: Programming 05-25-2012
15,418
Posted By Jaymoney
Unix grep in perl script
Hello,

Fairly simple really I have an xml file and I want to check to see if it contains a pattern. The pattern is "../"

On the command line I can type: grep "\.\./" myFile.xml
and I get...
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 09:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy