Sponsored Content
Top Forums Programming Shell script - if statements dont work Post 302987155 by rbatte1 on Tuesday 6th of December 2016 06:56:44 AM
Old 12-06-2016
Hello robertkwild,

What input do you use and what errors do you get?

You might be hitting a number of problems because you have minimal error checking and your mv command might have a null input so becomes invalid too. This might not be a problem for a simple helper script for yourself but might be more confusing if you delegate it.

Is a null response to the source directory okay? That would change to the user's home directory.



Robin
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

OS X / fsck / apps dont work no control panel

Alright. My neighbor kid brings me his iBook and says nothing works. He decided to move the file system to his likeness and that semed to create the problems. Now he doesn't have access rights to his home. I have run fsck over and over again and I keep getting ** fs modified ** I have also... (0 Replies)
Discussion started by: maxwell
0 Replies

2. Shell Programming and Scripting

Running remote shell script containing sql statements

I have a shell script which resides on three SCO machines containing some simple sqlplus statments. I need to run these scripts remotely. Currently, I am trying to use rsh to do so: rsh hostname myscript args The problem is that the arguments to the sqlplus statements in the remote shell... (4 Replies)
Discussion started by: Madbreaks
4 Replies

3. UNIX for Advanced & Expert Users

why the date format dont work in crontab

Hi I tried to put a cron job which pipes the logfile appended to date +%d but it didnt work . anyone know how to make this happen thanks in advance -prasad (7 Replies)
Discussion started by: p4cldba
7 Replies

4. Shell Programming and Scripting

if [ -z echo foo | egrep -e 'regexp' != '' ] -> dont work

Hallo, I need to test a String (a special ip number-string). So I want to run that: ipadress=172.0.0.0 # for debugging: echo $ipadress | egrep -e '172\.?\.??\.??$' # the test that doesnt work if test -z `echo $ipadress | egrep -e '172\.?\.??\.??$'` != "" then echo "match" else... (1 Reply)
Discussion started by: wiseguy
1 Replies

5. Shell Programming and Scripting

Looping through a shell script with sql statements

Hello members, I'm working on the Solaris environment and the DB i'm using is Oracle 10g. Skeleton of what I'm attempting; Write a ksh script to perform the following. I have no idea how to include my sql query within a shell script and loop through the statements. Have therefore given a... (4 Replies)
Discussion started by: novice82
4 Replies

6. Shell Programming and Scripting

Substitution in a file dont work with an Array in filename

Hi. I´ve a script that should substitude the 8th line in a file called xxx.num6. The "xxx" is set by an array filled with this command: j=0 for Par in *.sys ; do Par=`echo $Par | sed 's/\(.*\).sys/\1/'` ; Par2="$Par" ; echo "${Par2}" j=$((j + 1)); done Now i try... (0 Replies)
Discussion started by: Lock3
0 Replies

7. UNIX for Dummies Questions & Answers

keyboard and mouse dont work after sometime from boot in linux.

when i started booting linux ,after sometime both the mouse and the keyboard are getting freeze and wont respond(also the system gets hanged and all the process running dont go forward) ,nothing seem to work. Keeping in mind that it will work after sometime ,i waited for one hour also ,but... (1 Reply)
Discussion started by: sanjay.login
1 Replies

8. Shell Programming and Scripting

Can we use two shebang statements in a single shell script?

Hi, As per my understanding, we can use two shebang statements in a single shell script. Please see below snippet- #!/bin/bash .......## some code A #!/bin/csh .......## some code B exit 0; Here, code A will be executed using bash shell and code B will be executed with c shell. ... (9 Replies)
Discussion started by: tarunmudgal4u
9 Replies

9. Programming

Breakpoints dont work in Codeblocks, code does not build

Hey so I've written a program and it crashes every time I run it. I tried placing breakpoints to see what was going but to my surprise they do not work! I've placed them anywhere and they do not stop the execution of the program. In fact if I add code and hit rebuild it doesn't even build that... (1 Reply)
Discussion started by: Cambria
1 Replies

10. Shell Programming and Scripting

Dont want to mention user id passwd in shell script

Hi, i have one shell script which transfers files from one server to other server through FTP, but i can see login id and password is not mentioned. kindly help to understand the script.then how below script is working if login and password is not mentioned in script #!/bin/sh... (1 Reply)
Discussion started by: ni3b007
1 Replies
faxq-helper(1)						       mgetty+sendfax manual						    faxq-helper(1)

NAME
faxq-helper - privileged helper process to access the fax queue SYNOPSIS
faxq-helper <command> [<options>] DESCRIPTION
faxq-helper is part of the internal workings of faxspool(1). Formerly, the /var/spool/fax/outgoing directory was world-writeable, leading to all sort of funny symlink attacks against faxspool(1) and faxrunq(8). These days, it's owned by the user ``fax'', and only this user can write to it. To be able to put jobs there, faxspool(1) calls faxq- helper for very clearly defined purposes: - make a new queue directory - put a new fax G3 file into this queue directory - put a JOB file into this queue directory, and activate the fax job and possibly: - remove a fax job from the queue (to be used by faxrm and in case of errors) - re-queue a job that has been suspended due to repeated failures (faxq -r) To achieve this, faxq-helper is installed set-user-id fax. If you remove the suid bit, or chown the fax queue directory to a different user, it will stop working. RETURN VALUES
faxq-helper has the following exit() values: 0 everything went fine 1 invalid JOB ID specified on the command line 2 some problem with the directory setup of the outgoing queue dir, /var/spool/fax/outgoing (it will print a detailed error message) 3 some problems with the user ID setup of the ``fax'' user (it will print a detailed error message) 10 failure to process the specified command (it will print a detailed error message) SEE ALSO
faxspool(1), faxq(1), faxrm(1), faxqueue(5) AUTHOR
faxq-helper is Copyright (C) 2004-2006 by Gert Doering, <gert@greenie.muc.de>. greenie 18 Feb 06 faxq-helper(1)
All times are GMT -4. The time now is 12:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy