10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I will invoke a shell script.bash -x ./00_remove_tenants_FR_BE_instanceData.sh CGD2ICON CGDEV2 50005 cgdev2@123
I need a string of
"cgdev2/'cgdev2@123'@localhost:50005/cgd2icon"
parameters ==> 2nd 4th 3rd ... (3 Replies)
Discussion started by: pranabpal
3 Replies
2. UNIX for Dummies Questions & Answers
I am using the following nested loop
for i in {1..3}
do
for y in {1..3}
do
if ;
then
echo P0${i}R${y}.fas
mv P0${i}R${y}.fas P${i}R${y}.fas
read -t 5
fi
done
done
I was wondering if I can use a character such as * or ? instead of my second variable y. I tried R in... (3 Replies)
Discussion started by: Xterra
3 Replies
3. Shell Programming and Scripting
In a bash script I have:
LSCMD="find /project/media/ -mindepth 2 -maxdepth 2 -name \"files*pkg\""
ALL_PACKAGES=$( $LSCMD | sort 2>/dev/null)
But I get nothing returned. It's just all blank. If I run the find command in a terminal, I get dozens of hits.
I figure it's the way how I'm... (3 Replies)
Discussion started by: superbbrr
3 Replies
4. Shell Programming and Scripting
Hi All,
for a script I'm writing I need to be able to put the following command in a variable:
tail -30 <file> | egrep "JBoss \(MX MicroKernel\) .* Started"
I thought surround it with single quotes would work. However, it doesnt escape the wildcard, and results in the wildcard being expanded... (8 Replies)
Discussion started by: dpatters
8 Replies
5. Shell Programming and Scripting
Ok, this one isn't for everybody, it's pretty tough and I've spent a good deal of time on it without figuring it out yet.
Can anybody get this script to work:
#!/bin/bash
cq_fname="%let outputfile="/user/cq_"$1".csv";"
sed "29s/.*/\"$cq_fname\"/" file1.sas >... (3 Replies)
Discussion started by: nocloud
3 Replies
6. Shell Programming and Scripting
Please tell me how to nest logical expressions in bash. I would like to nest logical expressions for arguments of the "test" command on bash.
The following pseudo-code shows my intention.
// pseudo code
if (exp1 AND (exp2 OR exp3))
{
Output true;
}
else
{
Output false;
}
... (11 Replies)
Discussion started by: LessNux
11 Replies
7. Shell Programming and Scripting
Hi,
How to use values in one for loop to other for loop.
say "$sf_rel" variable has values "2011/W2 2011/G2" I want to use these values in inner for loop to process properly.
$branch variable has G2 and 6
What is happening is outer for loop $i has 2011/W2 it is entering into inner... (3 Replies)
Discussion started by: Anjan1
3 Replies
8. UNIX for Dummies Questions & Answers
Here's the input:
alpha, numeric or alphanumeric string ("line 1 string")
numeric string ("line 2 string")
numeric string ("line 3 string")
numeric string ("line 4 string")
...
where
- each numeric string is in a pattern that can be matched with RE but
- there can be any number of... (2 Replies)
Discussion started by: uiop44
2 Replies
9. Shell Programming and Scripting
Just started learning bash ,and I am confused with sintaksis
line 16: syntax error near unexpected token `else'
thanks
#!/bin/bash
echo -n "Enter: "
read num
if(($(echo ${#num}) == 0 ))
then
echo No arguments passed.Try again
elif
rem=$(echo $num | tr -d )
... (7 Replies)
Discussion started by: lio123
7 Replies
10. Shell Programming and Scripting
Hello.
I have the following problem with bash code:
function fl1_load_modules_and_get_list()
...........
for module in $FL_MODULES_TO_PROCESS
do
source "${FL_MODULE_DIR}/${module}/module.sh"
done
...........
}
function fl1_handle_install
{
local... (12 Replies)
Discussion started by: FractalizeR
12 Replies