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
All,
I have a basic buzz program written in python with return function. If i change return with print,it works fine but i want to know whats wrong with return statement.Can anyone help me whats wrong with this
#!/usr/bin/python
def div4and6(s,e):
for i in range(s,e+1):
if... (5 Replies)
Discussion started by: oky
5 Replies
3. Shell Programming and Scripting
#!/bin/bash
currentdatee=$(date +%D-%R)
rsync -autb --backup-dir="/home/kyle/USBSYNC/OLDFILES/CRUZEREDGE1/" --suffix="$currentdatee" /mnt/backup/* /home/kyle/USBSYNC/CRUZEREDGE1/
The rsync line simply doesn't work when I try this. It'll work if I make the suffix something static. I feel... (1 Reply)
Discussion started by: corrado33
1 Replies
4. Solaris
after shutting down the server and the ILOM/ALOM,
its date seems to go back to 1977..rather than current date..
problem with battery on ILOM/ALOM ??:( (1 Reply)
Discussion started by: ppchu99
1 Replies
5. Shell Programming and Scripting
Need your assistance, to find the bug in the function.
Function usage erroring out even after passing parameters.
usage() {
if || ; then
echo "************************************************************"
echo " CHECK USAGE FOR CORRECT PARAMETERS ... (26 Replies)
Discussion started by: raghunsi
26 Replies
6. Shell Programming and Scripting
Hi
I have a small function which returns a wrong value.
The function tries to make a connection to oracle database and tries to get the open_mode of the database in the variable status.
However when a database is down the value of the status column is set to READWRITE i am not sure why.
I... (0 Replies)
Discussion started by: xiamin
0 Replies
7. Shell Programming and Scripting
I read man page for etc/shadow field..
on the 8th field, i assume that's the field to change account expire date.
my question is:
What value does the 8th field keep? i assume it's 13514 instead of "Date" value such as 11/10/08.
on the man page, it said: " expire value = 13514 = jan 1,... (11 Replies)
Discussion started by: c00kie88
11 Replies
8. Programming
Hi I looked up the reference but couldn't figure out whats wrong with my log funtions in ANSI C, need this log functions for a memory compiler, please help!!
#include <stdio.h>
#include <math.h>
int main(void)
{
double d ;
double logB(double x, double base);
printf(" ... (2 Replies)
Discussion started by: return_user
2 Replies
9. Programming
Hi,
I have two dynamically loaded libraries (shared objects), both of which include functions of the same name - foo. When I call 'foo' from libA, it takes it from libB, although it is implemented in libA as well. Since we need the function to be called from libA, we tried linking it with the... (1 Reply)
Discussion started by: rimon
1 Replies
10. Shell Programming and Scripting
First of all im using Bash, on a Debian-based machine. I tried to write a function that if the ls program found listed more than 25 lines I would automaticly use "ls | less". Its on another computer but if I recall it looked something like this...
Note: some code may look strange because im on... (4 Replies)
Discussion started by: riwa
4 Replies