Sponsored Content
Top Forums Shell Programming and Scripting I want to understand bash better Post 302362908 by Scott on Sunday 18th of October 2009 05:09:52 PM
Old 10-18-2009
Points 1, 2 and 3:

From the bash manpage:

Code:
       export [-fn] [name[=word]] ...
       export -p
              The  supplied  names  are  marked for automatic export to the environment of
              subsequently executed commands.  If the -f option is given, the names  refer
              to  functions.   If  no  names are given, or if the -p option is supplied, a
              list of all names that are exported in this shell is printed.  The -n option
              causes the export property to be removed from each name.  If a variable name
              is followed by =word, the value of the variable  is  set  to  word.   export
              returns  an exit status of 0 unless an invalid option is encountered, one of
              the names is not a valid shell variable name, or -f is supplied with a  name
              that is not a function.


       umask [-p] [-S] [mode]
              The user file-creation mask is set to mode.  If mode begins with a digit, it
              is interpreted as an octal number; otherwise it is interpreted as a symbolic
              mode mask similar to that accepted by chmod(1).  If  mode  is  omitted,  the
              current  value  of the mask is printed.  The -S option causes the mask to be
              printed in symbolic form; the default output is an octal number.  If the  -p
              option is supplied, and mode is omitted, the output is in a form that may be
              reused as input.  The return status  is  0  if  the  mode  was  successfully
              changed or if no mode argument was supplied, and false otherwise.


       --noprofile
              Do not read either the system-wide startup file /etc/profile or any  of  the
              personal initialization files ~/.bash_profile, ~/.bash_login, or ~/.profile.
              By default, bash reads these files when it is invoked as a login shell...

As to point 4, you said in point 3 that your .bash_profile called .bashrc. So when you called your .bash_profile from your .bashrc, .bash_profile called .bashrc. And .bashrc called .bash_profile, which called....
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

can't understand

how i can download this game n start it :S (5 Replies)
Discussion started by: BoyArcher
5 Replies

2. UNIX for Dummies Questions & Answers

can't understand this at all.

Ok, i've been trying to write some shell scripts. nothing challenging, but just automating All of the tutorials i read say to start the file with #!/bin/bash or whatever your path to bash is. So i do it, and all of my scripts error out saying ./nameofscript:command not found when i... (4 Replies)
Discussion started by: severndigital
4 Replies

3. Shell Programming and Scripting

bash shell: 'exec', 'eval', 'source' - looking for help to understand

Hi, experts. Whould anybody clear explay me difference and usage of these 3 commands (particulary in bash) : exec eval source I've tryed to read the manual pages but did not get much. Also could not get something useful from Google search - just so much and so not exactly, that is... (3 Replies)
Discussion started by: alex_5161
3 Replies

4. Shell Programming and Scripting

Understand Bash scripting encryption

Dear all, I have been working with Linux for quite few years but never required to learn Bash and Linux really dep doan. I want to learn bash I bought books and Have been reading on the Internet but I cannot find my answers, maybe I am blind. For example: What does this means? # for i in... (4 Replies)
Discussion started by: renpippa
4 Replies

5. Shell Programming and Scripting

I need to understand the differences between the bash shell and the Bourne shell

I do not claim to be an expert, but I have done things with scripts that whole teams of folks have said can not be done. Of course they should have said we do not have the intestinal fortitude to git-r-done. I have been using UNIX actually HPUX since 1992. Unfortunately my old computer died and... (7 Replies)
Discussion started by: awk_sed_hello
7 Replies

6. Shell Programming and Scripting

Do not understand why my while loop fail (bash)

Hi again :) I still need your help now... #!/bin/bash SIZE=`ls -s text.txt` while do done My problem is that the line "while ..." still print the same value after the first loop. In one instruction change the size of text.txt I've run my bash script in debug mode, and the... (6 Replies)
Discussion started by: Link_
6 Replies

7. UNIX for Dummies Questions & Answers

Another Simple BASH command I don't understand. Help?

I have a text file called file1 which contains the text: "ls -l" When I enter this command: bash < file1 > file1 file1 gets erased. However if I enter this command: bash < file1 > newfile the output from "ls -l" is stored in newfile. My question is why doesn't file1's text ("ls -l") get... (3 Replies)
Discussion started by: phunkypants
3 Replies

8. Shell Programming and Scripting

Learning curve to understand bash iteration

Hi Folks, I know on one side there is script and on another side there is smart script. I am able to achieve what I got but thought there has to be a code which doesn't require multiple lines. So if you guys can help me out than it will be awesome. Also I wrote in cshell but if can get both the... (4 Replies)
Discussion started by: dixits
4 Replies

9. Shell Programming and Scripting

How to understand special character for line reading in bash shell?

I am still learning shell scripting. Recently I see a function for read configuration. But some of special character make me confused. I checked online to find answer. It was not successful. I post the code here to consult with expert or guru to get better understanding on these special characters... (3 Replies)
Discussion started by: duke0001
3 Replies
shells(4)							   File Formats 							 shells(4)

NAME
shells - shell database SYNOPSIS
/etc/shells DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser- shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root. A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines which search the file. Blank lines are also ignored. The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh, /bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/pfcsh, /usr/bin/pfksh, /usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh. Note that /etc/shells overrides the default list. Invalid shells in /etc/shells may cause unexpected behavior (such as being unable to log in by way of ftp(1)). FILES
/etc/shells lists shells on system SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4) SunOS 5.10 4 Jun 2001 shells(4)
All times are GMT -4. The time now is 03:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy