10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All;
I have 2 variable let's say $A and $B. These are actually some remotely executed command outputs. I captured these values in my local variables. Here is my problem. When I try to do some arithmetic operation with these variables, I receive an error message. Neither expr nor typeset -i... (3 Replies)
Discussion started by: Meacham12
3 Replies
2. Shell Programming and Scripting
In my script I'm retrieving a parameter through an API call. I need to trim some things out of the result so I can use it as a parameter to pass to another process. I've got it working but it's pretty kludgy and I'm hoping someone can help me with a better way.
This is the code that retrieves... (2 Replies)
Discussion started by: withanh
2 Replies
3. Shell Programming and Scripting
Hello guys,
here is my problem:
I got a shell script which is called by an external piece of software, the external software is not under my control. The software passes data as an argument to my script like
./bla.sh 'service;1234567890;ok;hostname;some text here'
I need to pass the... (3 Replies)
Discussion started by: snoogie
3 Replies
4. Shell Programming and Scripting
Hello,
How can we write the pseudo code below using Bash shell scripting?
table = ;
i=0;
do{
grep table h.txt;
}while(i<3); or
table = ;
i=0;
for(i=0;i<3;i++)
grep table h.txt; (4 Replies)
Discussion started by: dbgork
4 Replies
5. Shell Programming and Scripting
Hello,
I have 1000 of sql queries and i need to push column value in query. e.g.
SET INSERT_ID=1
INSERT INTO test (id,name) VALUES ('a');
SET INSERT_ID=2
INSERT INTO test (id,name) VALUES ('b');
SET INSERT_ID=3
INSERT INTO test (id,name) VALUES ('c');
SET INSERT_ID=4
INSERT INTO test... (12 Replies)
Discussion started by: mirfan
12 Replies
6. Shell Programming and Scripting
i need one help....
if i have a string like aaaaa,bbbbb,ccccc,aaaaa
How to to split the string and check howmany times aaaaa will be in that string?
Thanks (7 Replies)
Discussion started by: karthinvk
7 Replies
7. Shell Programming and Scripting
Hi,
if I have a string delimited by commas how can I put each character on a new line followed by a carriage return, and output this to a filee.g
from:
s,t,r,i,n,g
to
s
t
r
i
n
g
thanks you (3 Replies)
Discussion started by: Wahmed9
3 Replies
8. Shell Programming and Scripting
In a bash script I've set a variable that is the directory name of where an executable lives.
the_dir=`dirname $which myscript`
which equates to something like "/path/to/dir/bin"
I need to cut that down to remove the "bin" so I now have "/path/to/dir/".
This sounds easy but as a... (2 Replies)
Discussion started by: Witty
2 Replies
9. Shell Programming and Scripting
I want to remove a line that has empty string at second field when I use cut with delimeter , like below
$cat demo
hello, mum
hello,
#!/bin/sh
while read line
do
if
then
# remove the current line command goes here
fi
done < "demo"
i got an error message for above... (4 Replies)
Discussion started by: bonosungho
4 Replies
10. Shell Programming and Scripting
Hi all,
I have a file of around 300 lines in which string "SERVER" occurs around 32 times.
for eg.
I need to split files like, for eg
I am using this code
awk '/SERVER/{n++}{print > f n}' f=/vikas/list /vikas/final
But the problem is that it makes maximum of 10 files, but I... (12 Replies)
Discussion started by: vikas027
12 Replies