Results 1 to 3 of 3
Hi,
I've a script like:
test.sh
---------------------
#!/bin/bash
echo "first"
ln -s ~/log/file pks
echo "second"
---------------------
Is there any way ? so that when my script runs, it should ...
- 05-21-2009 #1Just Joined!
- Join Date
- Jun 2006
- Posts
- 40
Is there any way to disable creation of soft link without using #
Hi,
I've a script like:
test.sh
---------------------
#!/bin/bash
echo "first"
ln -s ~/log/file pks
echo "second"
---------------------
Is there any way ? so that when my script runs, it should not create any link as mentioned above . Is that possible ?
IF I don't want to use a # to make it comment. so what else.......Any help ?
Thanks-
Pawan
- 05-21-2009 #2
I don't know why you don't want to use a hash mark, but I suppose you could use a here document (this is generally used for larger blocs of text).
- 05-21-2009 #3Just Joined!
- Join Date
- Jun 2006
- Posts
- 40
Hello egan,
Thanks a lot for your suggestion, I just came up with a newer one (newer only to me, might be you're already friendly with this).
If you use a ":" at the start of any line instead of the usual "#" it won't get executed at all. But, the scope is limited to a single line only, with no other ";" in that line.
I used the ":" and now the link is not being created by the script.
I might have posted a silly question, but just to get another trick, in explaining the things to novice users, like me.
Thanks-
Pawan


Reply With Quote
