10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I am trying to write a shell script to check if a command executed successfully or not in rhel 7 and finding the installed tomcat version.
I am using below script.
var4=$(find / -name "catalina.jar" ! -size 0 |egrep -v... (6 Replies)
Discussion started by: sravani25
6 Replies
2. 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
3. Shell Programming and Scripting
I am able to execute awk command from shell prompt. but the same command is not getting executed when written and run in a bash script
the command from bash cmd prompt.
awk '/world/{for (i=2; i<NF; i++) printf $i " "; print $NF}1' myfile >tmp$$ ; mv tmp$$ myfile
file:
# hello world my... (4 Replies)
Discussion started by: ashima jain
4 Replies
4. Shell Programming and Scripting
I am trying to automate a testcase . I am installing some software and it waits for user input after displaying "Do you want to continue ? " I am trying to do this in shell scripting.
#!/bin/bash
#!/usr/bin/expect -f
/usr/bin/expect << EOF
spawn apt-get install openjdk-7-jdk
expect "*Do you... (1 Reply)
Discussion started by: Abdul Navaz
1 Replies
5. Programming
i used a two-way linked list "node" for the code::
#include<stdio.h>
#include<malloc.h>
void insert();
void reverse();
struct node
{
char c;
struct node *next;
struct node *back;
}*start=NULL;
int main()
{
int n,i; (4 Replies)
Discussion started by: mscoder
4 Replies
6. Shell Programming and Scripting
hi,
i have to send an email once a day at ceratin time say 22.
i have tried with date commad, but not working.:(
HOUROFTHEDAY=`date +'%H'`
if ; then
mailx -s "Info" emailid@org.com < $ProcessStatisticsFile
fi
Please help me... (5 Replies)
Discussion started by: sreelu
5 Replies
7. UNIX for Dummies Questions & Answers
Hello Everybody,
Please help.
I was trying to automate the use of a third-party given shell script. The script is written to be used at run-time to collect a few variables to be provided by the user through key board, in the fashion as below:
./runcommand
please provide a file name to... (6 Replies)
Discussion started by: Dingrong
6 Replies
8. Shell Programming and Scripting
i'm writing some simple scripts to help me learn perl.
why does the print command get called after the shell script is executed?
the purpose of the shell script is to simply echo to the screen "script run". which is does, but before the print command, you can clearly see the shell script is... (3 Replies)
Discussion started by: mjays
3 Replies
9. UNIX for Advanced & Expert Users
hi , can anyone help with a script to send SMS to some mobile numbers on some conditions. (1 Reply)
Discussion started by: sdcoms
1 Replies
10. Shell Programming and Scripting
I have wrriten a script to call sql script to do some work in database. However, the script couldn't be executed. The only information was: ksh: ./updt_attrib.ksh cannot execute. Please help me to identify where the problem is. I post script here for your reference. Thanks a lot.
#!/bin/ksh
... (8 Replies)
Discussion started by: duke0001
8 Replies