Thx Corona688
I'm extremely new to the script writing and just don't get it but I'm putting it together. I understand the "echo "dir already exist" thx I will make that change.
I don't know what you're talking about, I didn't mention that.
Quote:
But i'm not understanding the "exit 1"
It means, quit the script early with an error code. All programs return a number when they quit. Zero means success. Nonzero means failure of some sort. 'if' statements use these codes.
Quote:
An are you saying I could've wrote
if ! -d /home/AC_Drywall/MIS/Production/Marketing /home/AC_Drywall/MIS/Project1/...... all on one line and it would've created all of them with out doing it over and over again.
No, I'm saying you could've done:
...and it would create them all without going through it over and over again.
You don't need -d at all. mkdir -p checks for you.
You can put any command in an if-statement, mkdir included. Any command returns an error code.
I am trying to create a menu, and the script fails on ln 38 (Files in pwd). Any idea on where the problem is??
Thanks for the help
Rob
#!/bin/bash
# Cool Script for Weekly Assignment 2 (#3) that creates a menu to act as a ui
# and run some popular commands.
clear
while :
do ... (9 Replies)
I can do this on the command line:
sqsh -S 192.168.x.x -o tmp -U user -P fakepass -D horizon -C "\
select second_id
from borrower
where btype like '%wsd%'
"
I can also just leave the SQL at the end intact on one line ....
... However, when I throw this in a script like:
$SQSH -o... (4 Replies)
Hi,
I am a complete Unix novice and need some help with creating a login shell script. I have created a file with user details i.e. PIN, name etc and require help in recalling the specified details from the file and being prompted for a password on login. Any help would be very much appreciated.... (0 Replies)
Hi All,
Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
Issue:
While executing shell scripts in bash shell, following error messages are thrown:
rm:command not found
On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi I am new to unix and need some help, the main reason I am here is because i need basic unix knowledge
The... (2 Replies)
PLEASE HELP!
NEED LINUX SCTIPT
Need to write a bash shell script to show information of employees of a department from a company data set.
The script should accept a project number (1/2/3/10/20/30) and output
* the name of the project
* the name of the manager of the controlling... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a bash shell script that presents work information of employees of a department from a company data... (1 Reply)
Hello Friends
I am having trouble with my script below. I will describe the problems below the code box. I am hoping that some of the experts here can help me.
#!/bin/bash
#=========================================================================================================
# Rsync File... (8 Replies)
Hi,
maybe I'm asking a VERY dumb question, but would anybody out there tell me, why this f****** script won't work if executed as a cronjob, but works fine if executed from a shell prompt?
#! /bin/bash
set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
date >>... (3 Replies)
Migrating Unix batch jobs (Korn Shell) running in HP-UX server to Linux environment.
Hi All
Please help me to understand the easiest way to migrate Kernel Shell scripts to Linux Bash. Also let me know
1. Any automated scripts or tools available for this.
2. Challenges and issues... (5 Replies)
Discussion started by: cpremesh
5 Replies
LEARN ABOUT DEBIAN
atfsit
atfsit(1) ShapeTools atfsit(1)NAME
atfsit - A program to prepare files for version control
SYNOPSIS
atfsit [ -cFhfsmM ] [ -qad ] [ -Iflags ] [ -Rflags ] [ -tdirectory ] file1 ...
DESCRIPTION
Atfsit is a semi-intelligent program to prepare files for ShapeTools version control. This involves putting the correct type of headings
at the top of the file so that retrv will update a header and log changes in the file.
By default, atfsit will use default headers ``hard-wired'' into itself for each different file type that it ``knows'' about. (See below
for list of known file types).
If the -tdirectory option is specified, then atfsit will use ``.template.suffix'' files (where ``suffix'' is a suffix that atfsit ``knows''
about) found in directory. If a directory name is not specified on the command line, then the environment variable TEMPLATES is used. If
$TEMPLATES is not set, then the environment variable, HOME is tried.
The following template files are recognized:
Template NameFile Type
---------------------------------------
.template.c Standard C
.template.h C Include
.template.f Fortran
.template.shShell Script
.template.makeMakefile
.template.manManual
Atfsit is ``semi-intelligent'' in that it can guess the type of headers to put in the file by the type of file (C program, C include, make-
file, shell script, or manual). It determines the file type by looking at the name of the file. If the name of the file is ``Makefile''
or ``makefile'', then the file type is taken to be for make(1). The suffix after the last ``.'' in the file name is then used. The fol-
lowing table shows the suffixes that atfsit knows about:
Suffix File Type
---------------------------------------------
c C Program
F C Program (with compile flags)
h C Include
f Fortran
mk Make(1) file
sh Shell Script
csh Shell Script
[1-9] Manual (digits 1 - 9)
If the environment variable ``ATFSDIR'' is present, then atfsit will attempt to make a link from it to ``AtFS'' in the current directory if
the -I option is used and there is no directory called ``AtFS'' already, in the current directory. If the -I option is used and ``ATFS-
DIR'' is not specified in the environment, then a normal directory called ``AtFS'' will be created. This feature can be overrided with the
-d option.
OPTIONS
c Force file type to be ``Standard C''.
F Force file type to be ``Standard C''. Add a special header-line for recording of compile-time options in addition to the default
header. The inserted line has the form static char *ConfFlg = CFFLGS. CFFLGS must be a string value. As it is very inconve-
nient, to define the proper value of CFFLGS from the command-line, this feature is more intended to be used from within Make-
files.
h Force file type to be ``C Include''.
f Force file type to be ``Fortran''.
M Force file type to be ``Manual''. Note: If you also specify the ``Iflags'' option, atfsit will run vadm(1) to tell ShapeTools
what kind of comment string to use for the manual file.
s Force file type to be ``Shell Script''.
m Force file type to be ``Makefile''. Note that this does the same thing as the -s option does. It just prints a different mes-
sage.
t Do not use any Template files for the headers.
q Be quiet. Don't print out what is going on. Only error messages are printed.
d Do not attempt to make the directory ``AtFS''. See above for more info.
a Turn off auto guessing of file type.
Iflags Check In file. Run save(1) on the file with ``flags'' being passed onto save(1) as the command line arguments.
Rflags Run vadm(1) with ``flags'' as the command line arguments.
FILES
/tmp/atfsit* - temporary buffer
~/.template.* - template files to use as the header.
AUTHOR
Michael Cooper (mcooper@usc-oberon.ARPA)
Modified for use with ShapeTools by Axel.Mahler@cs.tu-berlin.de
SEE ALSO save(1), vadm(1), retrv(1).
DIAGNOSTICS
Complains about the usual stuff. (i.e. - the specified file doesn't exist, or it can't read it...just things like that.)
atfsit-1.15 Tue Jun 29 16:29:16 1993 atfsit(1)