10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
The requirement is i need to find an array value matching with pattern {5:{ , replace that with 5: and reassign that to same array index and print it.
I write something like below and the issue is sed command is not working. If i replace " with "`" the script gives syntax error.how can i... (8 Replies)
Discussion started by: bhagya123
8 Replies
2. Shell Programming and Scripting
I want to run commands inside a bash script.
An example is
I want to pass the command in a string as regexp as an argument to the script, then run sed on the bash variable
sed.sh regexp
sed.sh "-i \"s/<p>//g\""
then call
sed "$regexp" $fl (3 Replies)
Discussion started by: Kangol
3 Replies
3. Shell Programming and Scripting
How can I change the comma sign (,) to plus sign (+) with the sed command or any regex?
I mean to change only the comma that beteen the quotation marks.
From this file:
A,B,C
A,"B,C",D
"A,B",C,D
A,B,"C,D"
To this file:
A,B,C
A,"B+C",D
"A+B",C,D
A,B,"C+D" (6 Replies)
Discussion started by: elior
6 Replies
4. Shell Programming and Scripting
Hi All, my script.sh has the below lines, and i need to run the script as root or wam. please tell me if this will work
#!/bin/bash
sudo -t wam /usr/local/wam/stopwam -r ------- this needs run as wam user
/usr/local/web/stopweb -a --- this needs to run as... (18 Replies)
Discussion started by: nanz143
18 Replies
5. Shell Programming and Scripting
Hello,
You might help a newbie like me, I am trying to run a .sh inside my shell script. After running that I need to execute below commands. Here's how my scripts looks like. Hope you can help:
#!/bin/sh
cd $ORACLE_HOME/owb/bin/unix
./OMBPlus.sh ---> goes to OMB+> directory
cd... (10 Replies)
Discussion started by: aderamos12
10 Replies
6. Shell Programming and Scripting
Hi
I'm trying to run a script " abc.sh" which triggers "use.sh" .
abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script.
Please find below the scripts:
#abc.sh
#!/usr/bin/expect -f
exec /root/use.sh
expect "*name*"
send... (1 Reply)
Discussion started by: baddykam
1 Replies
7. Shell Programming and Scripting
I have an input file at ./$1.txt
with content of seq numbers like :
1234567890
1234589700
.
.
so on..
I need to take each seq nbr from the input file ,run the query below:
select ackname,seqnbr from event where event_text like '%seqnbr( from the input file)'
and redirect the... (11 Replies)
Discussion started by: rkrish
11 Replies
8. Shell Programming and Scripting
how do i run a script from if block inside another script?
this is what i tried but it doesnt seem to work:
if test $a -eq $w
then
sh /home/scripts/script1.bash
fi (3 Replies)
Discussion started by: shishirkotkar
3 Replies
9. Shell Programming and Scripting
Hi all,
I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously.
for Keeping... (2 Replies)
Discussion started by: rohithji
2 Replies
10. Shell Programming and Scripting
I am trying to pass a regular expression variable from a simple script to sed
to remove entries from a text file
e.g.
a='aaaa bbbb cccc ...|...:'
then executing sed from the script
sed s'/"'$a"'//g <$FILE > $FILE"_"1
my output file is always the same as the input file !!
any... (5 Replies)
Discussion started by: Daniel234
5 Replies