I will give that a try. Alternatively since the results of the bash have the $filename value in it (in bold), maybe that could be extracted and stored as $filename.
log stored by the bash at /home/cmccabe/medex.logs/folder.log
So the R_2017_01_13_12_11_56_user_S5-00580-24-Medexome would be extracted and saved as $filename for the below processes to use.
Thank you very much .
awk
Last edited by cmccabe; 01-17-2017 at 06:44 PM..
Reason: added not so perfect awk attempt
In a shell script, I am storing some values into variables. In between the code I am calling an PL/SQL precedure by connecting to ORACLE which generates a file. All this happens fine.
The problem is, the values are not getting stored in variables after this PL/SQL code while perfectly before... (1 Reply)
:)
Suppose,I have one table A. Table A have one column. Table A have 10 rows. I want this 10 rows store into shell script variable.
like
#!/bin/ksh
v_shell_var=Hi
here in call oracle , through loop How can I store table A's 10 rows into v_shell_var (Shell Script Array).
Regards,
Div (4 Replies)
Hi,
I'm trying to search a text file for a string: "energy(sigma->0)=". To do so, I executed the grep command, which returned many matches, for example:
energy without entropy = -112.16486170 energy(sigma->0) = -112.16520778
energy without entropy = -112.16488936 ... (5 Replies)
Hi,
I have few variable say 10
ex:-
l_pc_291334_01_0_01_00.cmp
l_pc_441133_50_0_02_00.cmp
l_pc_441133_55_0_02_00.cmp
Each variable value is coming via loop on a table.
I want to create a script that stores these value to a table or array ( But one by one not all at one time as... (4 Replies)
#!/bin/bash
#...
for i in `ls -c1 /usr/share/applications`
do
name="cat $i | grep ^Name= | cut -d = -f2"
echo $name
#...
done
Now inside name as output is present:
while i want only the result of the command.
Ideally i would like obtain that information using only bash ... or... (8 Replies)
My script gives the following result. Is it possible to display the same in table format ?
1.
rex_best
Latest feeds are not avaialable. The last feed was generated on 2012-05-17
File Name = ekb_best_20120517_010949_665.tar.gz
The Number of entry elements = 4209539
2.
rex_genre
Latest... (2 Replies)
In a directory i have a file *output* whose contents are changing for every simulation.
zgrep "trace file is" *output* | zgrep g
o/p: trace file is Int_01.1352176388z4f56ec33.0.trace.gz
I want to extract "Int_01.1352176388z4f56ec33.0.trace.gz" from the above result into a variable.
i... (2 Replies)
I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients).
I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
The bash below loops through a specific directory dir and finds and writes the oldest folder to a variable called $filename.
#!/bin/bash
# oldest folder stored as variable for analysis, version log created, and quality indicators matched to run
dir=/home/cmccabe/Desktop/NGS/test
find... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT SUSE
rbash
RBASH(1) General Commands Manual RBASH(1)NAME
rbash - restricted bash, see bash(1)RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is
used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow-
ing are disallowed or not performed:
o changing directories with cd
o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
o specifying command names containing /
o specifying a filename containing a / as an argument to the . builtin command
o specifying a filename containing a slash as an argument to the -p option to the hash builtin command
o importing function definitions from the shell environment at startup
o parsing the value of SHELLOPTS from the shell environment at startup
o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
o using the exec builtin command to replace the shell with another command
o adding or deleting builtin commands with the -f and -d options to the enable builtin command
o using the enable builtin command to enable disabled shell builtins
o specifying the -p option to the command builtin command
o turning off restricted mode with set +r or set +o restricted.
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script.
SEE ALSO bash(1)GNU Bash-4.0 2004 Apr 20 RBASH(1)