problem in creating my own profile file in unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting problem in creating my own profile file in unix
# 1  
Old 01-28-2012
Bug 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
# 2  
Old 01-28-2012
it should be ./first.profile

there is no . before file-name
This User Gave Thanks to aksijain For This Post:
# 3  
Old 01-28-2012
Code:
. ./.file.profile

# 4  
Old 01-28-2012
ya it is ./first.profile
# 5  
Old 01-28-2012
thanks. It's working
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where to see my .profile file in UNIX?

Hi where to see my .profile file in unix thanks Dharma (2 Replies)
Discussion started by: na.dharma
2 Replies

2. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

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

3. Shell Programming and Scripting

problem in creating execute profile file in unix

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

4. UNIX for Dummies Questions & Answers

Help creating new .profile

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

5. Shell Programming and Scripting

Problem creating file with awk

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

6. HP-UX

HP-Unix 64 bit Tape Drive creating problem

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

7. AIX

To see vhost on VIOS after creating an HMC profile

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

8. Shell Programming and Scripting

Profile File in Unix

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

9. UNIX for Advanced & Expert Users

Problem in updating .profile file in HP-UX B.11.00 machine

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

10. OS X (Apple)

creating a new profile from command line

Does any1 know how to preform such an operation on a mac? any help appreciated (2 Replies)
Discussion started by: cleansing_flame
2 Replies
Login or Register to Ask a Question