10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the below script i found that the alias mkdir_s is getting invoked from function configure() i.e the alias is kicking in.
#!/bin/bash -e
shopt -s expand_aliases
alias mkdir=mkdir_s
mkdir_s(){
if ]; then
return
else
/usr/bin/mkdir "$1"
return
fi
}
configure()
{
mkdir -p... (9 Replies)
Discussion started by: mohtashims
9 Replies
2. Shell Programming and Scripting
I have the below script which creates a directory or simply terminates without throwing error (exit 1) incase the directory exists.
bash-4.1$ vi mdir.sh
#!/bin/bash -e
shopt -s expand_aliases
alias mkdir=mkdir_s
mkdir_s(){
if ]; then
echo " directory EXISTS "
return
else
echo "... (3 Replies)
Discussion started by: mohtashims
3 Replies
3. Shell Programming and Scripting
I have 7 functions those need to be executed as command line inputs, I tried with below code it’s not executing function. If I run the ./script 2 then fun2 should execute , how to initiate that function I tried case and if else also, how to initiate function from command line
if
then... (8 Replies)
Discussion started by: saku
8 Replies
4. HP-UX
:wall:What is this shell called ?
"/sbin/sh"
When I run "echo $SHELL" command on my HP-UX,I get above output.
In Linux It was "/bin/bash". Which is bash shell. (5 Replies)
Discussion started by: manalisharmabe
5 Replies
5. Shell Programming and Scripting
Hello,
I need to write a perl script to find where functions is called in c files..
The script should scan the file and find out the function names and then search to see where they are called...
Lets for now assume all functions are internal.
I don't know where to start :(
... (4 Replies)
Discussion started by: bojomojo
4 Replies
6. Shell Programming and Scripting
Hey,
I've come across and have used things like:
fase1=${QUERY_STRING%%&*}
and I was wondering what this kind of actions is called? (I'm talking about the % and # operators on strings) Does anyone know where i can find more info about it? It looks like a very powerful tool...
Regards,
Karel (1 Reply)
Discussion started by: KarelVH
1 Replies
7. Shell Programming and Scripting
Hi,
i'm trying to compare two directories in Unix.
I need a recursive search ie my shell script should also compare common files in those two directory and so on...
any clues.. ?? (2 Replies)
Discussion started by: yayati
2 Replies
8. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
9. Shell Programming and Scripting
My shell script is executing i am having no syntax errors or other errors. When i am testing the shell script i am having a problem that the procedure Prompt, Environment,List are not found.
I defined all these procedures in the shell script.
Environment()
{
FULL=N export FULL
LOGON=cat... (2 Replies)
Discussion started by: dreams5617
2 Replies
10. UNIX for Dummies Questions & Answers
I'm working on a project right now and I'm supposed to figure out how to go into a file located in a directory called ~cs252/Assingment/commandAsst/project/ and find all of the function calls to "sequentialInsert" and I tried using
grep... (7 Replies)
Discussion started by: adamsy
7 Replies