10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Here I am in a position to write a Unix Shell script(.sh) to remove MongoDB collection documents. I know how to remove based on a condition like below and it works for me.
eval 'db.Collection.remove({TimeStamp:{$lte: "'$var'"}})
But I need to change the remove statement based on a new parameter... (1 Reply)
Discussion started by: senthilmadhanT
1 Replies
2. Shell Programming and Scripting
Hi,
I have a shell script to install one of our products. It comprises of commands that are specific to the product installation. These commands require user inputs at different stages.
To avoid manual feeding of inputs every time, I tried using HERE document.
it is like-
#! /usr/bin
... (1 Reply)
Discussion started by: nishant.kansal@
1 Replies
3. Shell Programming and Scripting
Hi all,
$ echo $SHELL
/bin/bash
Requirement - How to pass oracle sql script as argument to unix shell script?
$ ./output.sh users.sql
Below are the shell scripts and the oracle sql file in the same folder.
Shell Script
$ cat output.sh
#!/bin/bash
.... (7 Replies)
Discussion started by: a1_win
7 Replies
4. UNIX for Dummies Questions & Answers
I want to create an IF condition with multiple condition, in the statement below I want to add OR EOF, can any one please advise how to do.
if } != $sample ] && ; then
echo .....
fi
code tags please (1 Reply)
Discussion started by: analyst
1 Replies
5. Shell Programming and Scripting
ssh $USR@$host /bin/bash <<\EOF >> ship-error.txt
awk 'BEGIN{f=0} !f { s=$0; sub(/,.+/, "", s); gsub(//, " ", s); t=(systime()-mktime(s)); if(t<=14400) f=1 } f ' /logs/shiperror.log
EOF
I want to use an echo command within the EOF. Is this possible?
something like this: So that it prints... (3 Replies)
Discussion started by: Deepthz
3 Replies
6. UNIX for Dummies Questions & Answers
I need a script that reads only printable characters (no duplicates) from all files in a directory and output them in a text file. (2 Replies)
Discussion started by: l20N1N
2 Replies
7. UNIX for Dummies Questions & Answers
I have a script which throws an error: "here document `EOF' unclosed"
The script is:
...
main()
{
RETVAL=`sqlplus -s $ConnectDetails << EOF
SET SERVEROUTPUT ON
DECLARE
errnum NUMBER;
errmsg VARCHAR2(1000);
BEGIN
My_Procedure( errbuf => errmsg, errcode... (2 Replies)
Discussion started by: laiko
2 Replies
8. Shell Programming and Scripting
I am trying to assign the value in variable using below command.
exp_stat=`sqlplus -silent USER_NAME/PWD <<EOF
set pagesize 0 feedback off verify off heading off echo off
select count(*) from TABLE_NAME;
exit;
EOF`
But getting the below error.
here... (2 Replies)
Discussion started by: gander_ss
2 Replies
9. Programming
Hi All,
I am supposed to present the documentation for the PLSQL code (PACKAGES, PROCEDURE, FUNCTIONS) of my application. There are sufficient comments in my code. Has anyone written any Shell Script Utility which can parse the PLSQL code and generate some kind of document ( preferrably HTML not... (1 Reply)
Discussion started by: gauravsachan
1 Replies
10. Shell Programming and Scripting
Hi,
I need to check whether one file has EOF or not.
There's one daemon in our system, which will pick the files FTPed to us. However, sometimes the daemon picks the file before FTP is finished.
So I'm planning to add some checking of EOF on the FTPed files in the shell script.
Could... (8 Replies)
Discussion started by: ideazhcy
8 Replies