10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
5. 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
6. UNIX for Dummies Questions & Answers
I want to print "empty" if $TEST is empty.
TEST=
if ${TEST:?} ; then echo empty; fi
But it doesn't work. What's wrong? (2 Replies)
Discussion started by: meili100
2 Replies
7. Shell Programming and Scripting
Hi,
I am getting some very strange output when using date function in PERL on Solaris.
Infact the month portion is wrong and it is 1 less then the current, means today it is responding as
month =3 , andthis should be 4 ------> April
Any help
my code is
($day, $month, $year) =... (3 Replies)
Discussion started by: Asteroid
3 Replies
8. 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
9. 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
10. 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