Very simple, ./abc.sh executes the script in a sub shell and this . abc.sh executes that in current shell ...
Execute the following script and understood it better.
1. From any directory if you executed it as ./abc.sh then it will just show as /tmp... ( it will also navigate to that specified dir, but in a sub shell .. so you wont be able to recognize it in your shell )
2. From any directory if you execute this script . abc.sh it will navigate to that directory in the current shell...
Hi,
I'm trying to do the following and can't figure out how to achieve it.
On my computer there are a number of folders called 'program' at various levels.
I would like to search for these folders (that are below my current level) and then use egrep to search for a string within files that... (6 Replies)
Hi Everyone,
cat 1.txt
a <abc
b vfff
c 000>
d 4444
the output is:
<abcvfff000>
by using perl or awk, can get the value betwee "<abc" and ">", assume 1.txt has lots of those tags, so the output can filter out all those values.
Please advice.
Thanks (4 Replies)
Hi everyone
I am new to unix . i got struck up with small issue.
i have text file something like this
abc 'xyz' '5'
pqr 'lmn' '6'
i want to replace
abc 'xyz' '5' with abc 'tyr' '9'
but i know the key 'xyz'
based on the key 'xyz' i want to replace
please help me .
its... (3 Replies)
in a shell script, i hav a variable declared as "ABC-123".
i want to incriment th value ABC-123 by 1 so that the result will be
ABC-124.
Can anyone suggest a solution in shell scripting.. (4 Replies)
Hi friends,
I want to substitute "a ='....'," with ":" in everywhere in a string using Perl.
Details:
----------
my $str= " c1='fgfasfgasggfgff.,akhkhahha', c2='bbbn', c3='hg5 sh' ";
Required o/p: $str= " c1:c2:c3 "
I tried as below:
$str=~ s/=\'.*\',/:/g ;
print "str=... (14 Replies)