10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everyone,
I have written simple script below to check if ip is added to interface
#!/usr/local/bin/bash
IFCONFIG="/sbin/ifconfig"
SERVICE="/usr/sbin/service"
IP="79.137.X.X"
GREP=$(${IFCONFIG} | grep ${IP})
ip_quantity_check () {
echo ${GREP} | wc -l
}
if ];... (2 Replies)
Discussion started by: bryn1u
2 Replies
2. Shell Programming and Scripting
Hi ! all I am just trying to check range in my datafile
pls tell me why its resulting wrong
admin@IEEE:~/Desktop$ cat test.txt
0 28.4
5 28.4
10 28.4
15 28.5
20 28.5
25 28.6
30 28.6
35 28.7
40 28.7
45 28.7
50 28.8
55 28.8
60 28.8
65 28.1... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies
3. Shell Programming and Scripting
I am doing a simple "recycle bin" script. It is to check and see if the directory .TRASH exists within the home directory. If not then it makes the directory then appends a date and time to file and then finally moves the file in. However, when I run this script, it is not making the directory as... (5 Replies)
Discussion started by: iamdeman
5 Replies
4. Shell Programming and Scripting
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
Discussion started by: torchij
16 Replies
5. Shell Programming and Scripting
Good day all
I have a UNIX script that I created to set a couple of environment variables for my Oracle installation.
When I initially run the script, I get the correct values on the inbuilt echo command but when the script completes and I issue an echo statement
echo $ORACLE_SID, the... (9 Replies)
Discussion started by: tt1611
9 Replies
6. Shell Programming and Scripting
I write this script and do not no whrer the wrong!!
Can anyone hlep me?
#=========================================
Script Name: shell_script1
#=========================================
looptrack=y
while
do
echo -n “Type in the account number:” read account
echo -n “Type the first and... (3 Replies)
Discussion started by: Oman_Member
3 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to do a script that prompts the user for the PID and it displays information about that process, this is what I have, but is not working:
echo "Please enter your PID:"
read pid
case $pid in
ps | grep $pid
esac
done
* I also needed that this... (1 Reply)
Discussion started by: linuxrose
1 Replies
8. Shell Programming and Scripting
I had this working a few days ago but I since changed it. Heres the code
x=1
while 1 2 3 4 5 6
1=$(ps -ef | grep process | awk '{ print $2}')
if
then
echo "The database is accepting connections..."
echo "Now I will check the next process"
2=$(ps -ef | grep process1 |... (10 Replies)
Discussion started by: jeffs42885
10 Replies
9. UNIX for Dummies Questions & Answers
I start wetting my toes in Linux programming.
I tried the first program myls.c in Advanced Programming in the Unix Environment.
#include <sys/types.h>
#include <dirent.h>
#include "apue.h"
int main(int argc, char *argv)
{
DIR *dp;
struct... (1 Reply)
Discussion started by: cqlouis
1 Replies
10. Shell Programming and Scripting
I know that this is a ridiculously simple statement, but I am getting an error when I execute it, and I can't figure out what it is. Can anyone point me in the right direction?
#!/bin/ksh
integer dateMonth=0
integer intZero=0
if
then
dateMonth = 1
fi
echo $dateMonth (7 Replies)
Discussion started by: mharley
7 Replies