dots and slashes


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers dots and slashes
# 1  
Old 01-27-2007
dots and slashes

when I execute a command in like "run.sh," I can run it two ways:

./run.sh

or

. run.sh

What is the difference?
# 2  
Old 01-27-2007
./run.sh will be run in a subshell within the current shell. If there are any export statements in run.sh, it will not affect the current shell.

. run.sh will run within the current shell. There will be no subshell created to execute run.sh. Any export statements within run.sh will be exported to the current shell
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Print slashes using C

I want to print 4052 slashes using this C program. #include <stdio.h> void main() { int i; for (i=0; i<4052; i++) printf ("/"); } When i compile this via gcc am getting this error : http://gyazo.com/e0403e4789575d181d1695f9db3e6d6e.png Can anyone point out what am doing wrong? (15 Replies)
Discussion started by: vish6251
15 Replies

2. Cybersecurity

Server is ignoring slashes

When I try to access my website's Administrator page (mysite.com/administrator), I'm redirected to (mysite.comadministrator), as if the slash was removed from the URL The funny thing is that I can access it if I enter 2 slashes (mysite.com//administrator) Any ideas of what might be causing it? (4 Replies)
Discussion started by: rlopes
4 Replies

3. Shell Programming and Scripting

underscore to dots

Hi, I have been trying to change underscores to dots. For example: 1122_91 1022_233 . 2237_23 9382_2339 2998_234 345_257 . . Desired output: 1122.91 1022.233 . 2237.23 9382.2339 2998.234 345.257 . . Any idea? Thanks (4 Replies)
Discussion started by: iconig
4 Replies

4. Shell Programming and Scripting

Get file extension with multiple dots

I am trying to get the file extension with file names that could contain multiple dots using shell scripting. I want to find a way using the sed command. Example Filenames: one.dat one.dat.002 Results: dat I would like to return dat in both instances using the sed command. How can I... (4 Replies)
Discussion started by: smkremer
4 Replies

5. Homework & Coursework Questions

Crazy Dots

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: Create a script called DOTS that will display the horizontal or vertical number of dots if the first argument... (3 Replies)
Discussion started by: pchelpmtl
3 Replies

6. Shell Programming and Scripting

Replace multiple dots (.) with spaces ( )

Hi all, I have files in the filename pattern of, this.is.the.name.of.my.file.mov and I would like to remove dots (.) and replace them with spaces ( ) so the output would be, this is the name of my file.mov The other issue that I have is that the number of dots (.) in the file... (6 Replies)
Discussion started by: Monkey Dean
6 Replies

7. UNIX for Dummies Questions & Answers

using dots to change directories

how would i go down a directory using the ../.. (6 Replies)
Discussion started by: JamieMurry
6 Replies

8. Programming

maximum number of dots in a domain name

maximum number of dots in a domain name - not a sub-domain name. for example: mydomain.com ------ one dot mydomain.com.au ------ two dots do you know maximum number of dots in a domain name and could you provide a sample? thx. (1 Reply)
Discussion started by: hello20009876
1 Replies

9. UNIX for Dummies Questions & Answers

Password slashes.

Hi everyone! :) I've been asked to write an article breaking down the basics of UNIX password information etc., and I've come across something in which I cannot find a definition for within Google. Very simply, can anyone tell me what the difference is between a standard UNIX password, and... (4 Replies)
Discussion started by: hellz
4 Replies

10. UNIX for Dummies Questions & Answers

UNIX and forward slashes

Hey, This is probably going to sound like an immensely stupid and dull question, but can someone please tell me whether the forward slash on the web address (http://) signifies that it is running on UNIX? hanks (1 Reply)
Discussion started by: steverocliffe
1 Replies
Login or Register to Ask a Question