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
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
3. Programming
Given the following code inside the function ext3_write_super():
(It's there in Linux kernel 2.6.27.59)
static void ext3_write_super (struct super_block * sb)
{
if (mutex_trylock(&sb->s_lock) != 0)
BUG();
sb->s_dirt = 0;
}
The conditional test at if... (2 Replies)
Discussion started by: Praveen_218
2 Replies
4. UNIX for Dummies Questions & Answers
i am new to shell scripting!! i am making this program in bourne shell, that asks the user to input "Hello (their name)" or "question (their name)", any other input, "ERROR" will be outputted.
if they input "Hello (name)", i want to out saying Hello (name) but if they input "question (name)", i... (4 Replies)
Discussion started by: bshell_1214
4 Replies
5. 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
6. Programming
I don't know if it is right to ask you this. Can someone help me write a simple Xlib program,with button on it,and all that button do is switch 2 messages.
I have tried and tried,but never get past Hello World. Can someone help me please?
---------- Post updated at 10:17 PM ---------- Previous... (2 Replies)
Discussion started by: megane16v
2 Replies
7. UNIX for Dummies Questions & Answers
i am reading APUE now,and the OS in the book seems different from RH9,which i installed in my computer.
can you tell me if a linux environment can help me really understand the APUE?If not,which OS i should try,the BSD?
THANKS (1 Reply)
Discussion started by: mayuhao
1 Replies
8. 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
9. UNIX for Dummies Questions & Answers
The script below is supposed to list file and folder names and list the type besides each - It has no practical value - I am just trying to learn KSH (so far sounds like a bad idea!)
Expected output should look like this:
folder 1 *** dir ***
file1 * file *
The code runs but produces... (9 Replies)
Discussion started by: GMMike
9 Replies
10. Programming
I am new to the unix/linux environment.
AND........
I need to create a mini shell..that displays prompt (i.e., READY:$), accepts a command from std-in, and prints the command and any parameters passed to it. HELP!!!! (8 Replies)
Discussion started by: jj1814
8 Replies