#!/bin/bash
value=$(<man.txt)
echo "$value"
if [ "$value" == "true" ]; then
echo "startedif_manthan"
ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9;
sleep 30;
sudo sh /var/www/symmetric-ds-3.1.6/bin/sym --port 8082 --server;
fi
Hi There, I have this script killing a process and restart the script in some time.
#!/bin/bash
value=$(<man.txt)
echo "$value"
if [ "$value" == "true" ]; then
echo "startedif_manthan"
ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9;
sleep 30;
sudo sh /var/www/symmetric-ds-3.1.6/bin/sym --port 8082 --server;
fi
I have this script killing a process and restart the script in some time.
#!/bin/bash
value=$(<man.txt)
echo "$value"
if [ "$value" == "true" ]; then
echo "startedif_manthan"
ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9;
sleep 30;
sudo sh /var/www/symmetric-ds-3.1.6/bin/sym --port 8082 --server;
fi
I need to run above script in cron. Will it execute in cron without password?
Any suggestions?
#!/bin/bash
value=$(<man.txt)
echo "$value"
if [ "$value" == "true" ]; then
echo "startedif_manthan"
ps -ef|grep sym |awk '{ print $2 }'|sudo xargs kill -9;
sleep 30;
sudo sh /var/www/symmetric-ds-3.1.6/bin/sym --port 8082 --server;
fi
I need to run above script in cron. Will it execute in cron without password?
Any suggestions?
#!/bin/bash
value=$(</var/www/sym_monitor/manthan.txt)
if [ "$value" == "true" ]; then
ps -ef|grep sym |grep -v grep |awk '{ print $2 }'|sudo xargs kill -9;
cd /var/www/symmetric-ds-3.1.6/bin;
sleep 30;
(sudo ./sym --port 8082 --server);
fi
I'm trying to run the above script every 10 mins using cron.
#!/bin/bash
# Reading
cat /home/radiare/Desktop/first.txt | while read LINE
do
if [ "$LINE" == "false" ]; then
echo "Inside first loop"
break
fi
done
cat /home/radiare/Desktop/second.txt | while read LINE
do
if [ "$LINE" == "false" ]; then
echo "Inside second loop"
break
fi
done
In ubuntu client, I could able to execute this script and echo inside if statements are properly working.
Hi
I have a file which I am reading line by line and processing it.
But the last line is not getting read in the file loop until I put an enter in the end.
Code:
#!/bin/ksh -p
v_org_id=${P1}
FILE=${P2}
NEW_FILE_NAME=$APPLPTMP/b1.txt
BAKIFS=$IFS
IFS=$'\n'
exec 0<"$FILE"
echo "File to be processed.....: ${FILE}"
while read -r line
do
v_initial=`echo "$line&qu
I am trying to read user and server details from file tempo.txt and then check the disk space usage of the file system on that unix account using another script server_disk_space.sh.But I am not able to figure out why while loop is only working for first line and for loop is working fine.Please help me understand this.
Using while loop
#!/usr/bin/ksh
while read line
do
r1=`echo $line | cut -d"
For class I need to write a Bash script that will take the output from ispell and when I try and request user input inside the while loop it just saves the next line of the file as the user input.
How could I go about requesting user input in the while loop?
#!/bin/bash
#Returns the misspelled words
#ispell -l < file
#define vars
ISPELL_OUTPUT_FILE="output.tmp";
INPUT_FILE=$1
ispell -l <