01-28-2012
problem in creating my own profile file in unix
I am new in shell scripting. currently i am using cygwin. My problem is
i created a profile file in my own folder. file name is first.profile in which i gave following values to variable
export a=10
now i am executing this profile file by below command
./.first.profile
it executed succesfully. but when i am echoing the variable it is not giving any value
echo $a
it is necessary to create profile file in etc folder or i can create anywhere
Thanks in advance
10 More Discussions You Might Find Interesting
1. OS X (Apple)
Does any1 know how to preform such an operation on a mac?
any help appreciated (2 Replies)
Discussion started by: cleansing_flame
2 Replies
2. UNIX for Advanced & Expert Users
Hello All,
I am using a HP-UX machine and I want to update the .profile file so that after login to my userID that will be applicable to my ID also. What I am trying to do is :
In .profile file I am trying to write in /home/userID folder:
export PATH=$PATH:$HOME:.
so that whenever I will... (3 Replies)
Discussion started by: abhishek0071
3 Replies
3. Shell Programming and Scripting
Hi,
I have to run a sqr program.
In the profile file everything is set.
e.g
APPLID=personel
APPPATH=/${ENVIRONMENT}/${APPPATH}
and so on..
SQRDIR=/opt/sqr/bin/syb
Still when I'm running this script,its giving error APPLID not set and SQRDIR not set.
Any idea,why?
TIA (5 Replies)
Discussion started by: autosys_nm
5 Replies
4. AIX
I created a profile in HMC for a new LPAR and activated it but not yet installed AIX.
Is there a step to make this new LPAR available as vhostX from the VIO server after creating and activating an HMC profile?
I already shared the CD-ROM device from the HMC profile.
Thanks.
-... (1 Reply)
Discussion started by: learner1
1 Replies
5. HP-UX
Hello All,
I have HP Openview storage data protector version 5.5. When I am going to write my backup I have an error message saying "Connot Open Device /dev/rmt/0mn"
Follownig is my output:
# ls -l /dev/rmt/0mn
crw-rw-rw- 2 bin bin 205 0x080140 Jan 17 16:41 /dev/rmt/0mn
# uname -a... (2 Replies)
Discussion started by: hellozishan
2 Replies
6. Shell Programming and Scripting
Hello,
I don't understand why the script below doesn't act the way it should :
#!/bin/sh
awk 'BEGIN{printf("Entrez la date : "); getline date < "-"}
$0 ~ date {f=1;print;next}
/^{2}\//{f=0}
f' Planning.csv > planning.txt
It doesn't create file planning.txt with only the result of... (14 Replies)
Discussion started by: freyr
14 Replies
7. UNIX for Dummies Questions & Answers
Hi,
We have a load of users which point to the same basic profile by a link:
.profile -> /export/home/dusers/INIT/dot.profile
I'd like to create a seperate profile for one user -testu12. If I remove the link from his profile will it delete the actual dot.profile file?
I've tried to do a... (4 Replies)
Discussion started by: Grueben
4 Replies
8. Shell Programming and Scripting
first i created a profile file(my_var.profile) which contains
export my_var=20
after that i created shell scripts(my_var.sh) which contains
#!/bin/bash
. ./my_var.profile
echo '$my_var='$my_var
but when i am executing sh my_var.sh it is showing error that no such file/directory .profile.... (6 Replies)
Discussion started by: pratikjain998
6 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Here is what I am supposed to do, word for word from my assignment page:
1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies
10. UNIX for Dummies Questions & Answers
Hi
where to see my .profile file in unix
thanks
Dharma (2 Replies)
Discussion started by: na.dharma
2 Replies
LEARN ABOUT HPUX
rcvstore
RCVSTORE(1) [nmh-1.5] RCVSTORE(1)
NAME
rcvstore - asynchronously incorporate mail into a folder
SYNOPSIS
/usr/lib/mh/rcvstore [+folder] [-create | -nocreate] [-unseen | -nounseen] [-zero | -nozero] [-sequence name ...] [-public | -nopublic]
[-version] [-help]
DESCRIPTION
Rcvstore incorporates a message from the standard input into an nmh folder. This command is typically used in conjunction with mail fil-
tering programs such as slocal and procmail, to filter your mail into different folders.
You may specify which folder to use with +folder. If no folder is specified, rcvstore will use the folder given by a non-empty "Inbox:"
entry in the user's profile, else it will use the folder named "inbox".
If the switch -create is given (it is the default) and if the specified (or default) folder does not exist, then it will be created. You
may disable this with the -nocreate option. In this case rcvstore will exit if the specified folder does not exist.
When the new message is incorporated into the folder, it is assigned the next highest number for that folder.
Rcvstore will incorporate anything except zero length messages into the user's nmh folder. It will not change the message in any way.
If the user's profile contains a "Msg-Protect: nnn" entry, it will be used as the protection on the newly created message, otherwise the
nmh default of 0644 will be used. For all subsequent operations on this message, this initially assigned protection will be preserved.
If the switch -unseen is given (it is on by default), and if the profile entry "Unseen-Sequence" is present and non-empty, then rcvstore
will add the newly incorporated message to each sequence named by this profile entry. You may use the switch -nounseen to disable this.
These sequences will not be zero'ed by rcvstore prior to adding the new message.
Furthermore, the incoming message may be added to additional sequences as they arrive by the use of the -sequence switch. As with the com-
mands pick and mark, you may also use the switches -zero and -nozero to specify whether to zero old sequences or not. Similarly, use of
the -public and -nopublic switches may be used to force these sequences to be public or private sequences.
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
Path: To determine the user's nmh directory
Folder-Protect: To set mode when creating a new folder
Inbox: To find the default inbox
Msg-Protect: To set mode when creating a new message
Unseen-Sequence: To name sequences denoting unseen messages
SEE ALSO
rcvdist(1), rcvpack(1), rcvtty(1), mh-sequence(5)
DEFAULTS
`+folder' defaults to "Inbox" profile entry
`-create'
`-unseen'
`-nozero'
CONTEXT
No context changes will be attempted, with the exception of sequence manipulation.
BUGS
If you use the "Unseen-Sequence" profile entry, rcvstore could try to update the context while another nmh process is also trying to do so.
This can cause the context to become corrupted. To avoid this, do not use rcvstore if you use the "Unseen-Sequence" profile entry.
MH.6.8 11 June 2012 RCVSTORE(1)