10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger.
if ]
then
echo "Only satisfied variable with value"
... (3 Replies)
Discussion started by: prince1987
3 Replies
2. HP-UX
Can anyone help me in solving this ?
p=`date`
e=`echo $p | awk '{print $2,$3}'`
# echo $p
Wed Aug 4 12:00:08 IST 2013
but when I am echoing the value of e it is giving me with one space. As shown below:
# echo $e
Aug 4
I need this value to be exact as found in... (6 Replies)
Discussion started by: Kits
6 Replies
3. Shell Programming and Scripting
Hello,
I have a shell script where I am doing an isql to select some records. the result i get from the select statement is directed to an output file. I want to assign the result to a Shell variable so that I can use the retrieved in another routine.
e.g.
"isql -U${USER} -P${PASSWD} -S${SERVER}... (1 Reply)
Discussion started by: RookieDev
1 Replies
4. Ubuntu
Hi,
i am a beginner in ubuntu. my default shell is bash. everytime i try to change the shell with command "csh", i get a message (probably an error message). after i get into c-shell, when i try to execute a c shellscript, then it showed the same message. any idea about what is this about or any... (1 Reply)
Discussion started by: Avinash Nayak
1 Replies
5. Shell Programming and Scripting
Hai,
I need to search a variable inside a file using awk in AIX.
for ex:
file.txt
one
two
three
four
five
i need to get the lines with two
awk '/two/ {print}' file.txt
But i need to change the two as a variable since it would be changed on runtime..i tried like below..nothing give... (3 Replies)
Discussion started by: jesu
3 Replies
6. Shell Programming and Scripting
I'm trying to use a custom command in the configServer loadalert.txt file. the problem is that any command that I place inside the square brackets is simply not working.
This is a multi-part message in MIME format.
--------------
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
... (2 Replies)
Discussion started by: kshazad
2 Replies
7. Shell Programming and Scripting
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
Discussion started by: gvinayagam
3 Replies
8. Shell Programming and Scripting
Hi all
I run my program prog.c in the following way :
$ ./prog 1 > output.txt where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
Like
$ ./prog 1... (1 Reply)
Discussion started by: alice06
1 Replies
9. Shell Programming and Scripting
hi all,
i'm using the following script,
Status=1
Function_do ()
{
while read line;
do
if ; then
#echo $line
if ; then
Status=0
echo " LINKINK ERROR "
fi
fi
done < ldd.log
}
Function_do (4 Replies)
Discussion started by: vij_krr
4 Replies
10. Shell Programming and Scripting
Hi All.
I need help for the below logic.
I ve a file like following
input file:
NopTX(5) // should be remain same as input
----Nop(@100); //1
Nop(90); //2
--Nop(80); //3
@Nop(70); //4
--@Nop(60); //5
@Nop@(@50); //6
--Nop@( 40); ... (3 Replies)
Discussion started by: user_prady
3 Replies