Hi all,
Could you please let me know how to return back the value calculated from a shell script to the main script from where its called from.
shell: KSH
example: i have two shell scripts a.sh and b.sh.
i am calling b.sh from a.sh and in b.sh suppose i calculate the word count and other calculations, How can i pass this value calculated from this b.sh script back to a.sh
example code a
I would like to know how to automate an already made shell script (all the steps of all the commands done on a specific folder) by utilizing a list (a .txt) of all folder names that the shell scripts goes and executes
For example:
In the working folder called main/ there are subfolders named folder1, folder2, folder3.....folder100 and shell script shell.sh.
vi shell.sh
Code:
perl au
A bit of background
I'm a developer and I install most of my tools in my home folder. So my shell's rc file is full of JAVA_HOME, GROOVY_HOME, MAVEN_HOME, ... variables.
For example, I have a file look as follows:
abc
def
ghi
Now, I want to use a Linux shell script to set some variables according to this file. I need the following variables to be set something like:
export abc=abc111
export def=def111
export ghi=ghi111
As you can see that the variable names are retrieved from list file as well. Thanks.
I have searched stackexchange and other website for the difference.
It is said that environment variable is inherited in child processes but shell variables are not. However the following test shows shell variables are seen in child process just as environment variables. Any suggestion please?
I encountered a strange issue this morning. My $PATH environment variable is screwed up by a command
export PATH=./releases/bin:$PATH
It is totally okay to run this under a existing shell, the issue is I put it in the shell startup shell script .profile.
I encountered a strange issue this morning. My $PATH environment variable is screwed up by a command
export PATH=./releases/bin:$PATH
It is totally okay to run this under a existing shell, the issue is I put it in the shell startup shell script .profile.
I need to get total number of rows in a table by using select count(*) from table and need to assign into a variable in shell script.
Thank you very much for viewing my post and offering your suggestions & help. I really appreciate it. ~Simba
1. The problem statement, all variables and given/known data:
File "Ageing" Shell Script
Part A) Write a shell script that will count the number of files in your account that were last modified 5 or more days ago.