Sponsored Content
Homework and Emergencies Homework & Coursework Questions Shell Script - (file and directory) Post 302735607 by Scott on Sunday 25th of November 2012 05:06:55 PM
Old 11-25-2012
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell script to search content of file with timestamps in the directory

hello, i want to make a script to search the file contents in my home directory by a given date and output me the line that has the date... (10 Replies)
Discussion started by: psychobeauty
10 Replies

2. Shell Programming and Scripting

getting : No such file or directory while executing a shell script

Hi all, I am getting : No such file or directory while executing a shell script. But i have that corresponding file in the corresponding path. It also have executable rights. Please help me out in this Thanks in advance. Ananthi.U (7 Replies)
Discussion started by: ananthi_ku
7 Replies

3. Shell Programming and Scripting

Shell script for a writing the directory structure to a file

Hi All, I am new user of shell scripting has come up with a problem. that I have a directory structure like : Home | |--------A | |----trunk | |-------A_0_1/ | | | |-------A_0_2/ | |--------B | ... (6 Replies)
Discussion started by: bhaskar_m
6 Replies

4. Shell Programming and Scripting

delete only particular file in directory shell script

Hi, what function do we use to delete only particular file that we want in directory shell script for example I want only to delete test.txt in directory how to do it ? in sh Thank (1 Reply)
Discussion started by: guidely
1 Replies

5. Homework & Coursework Questions

Shell Script - (File and Directory)

1. The problem statement, all variables and given/known data: My problem is that when I made up a non-existing directory, it prints out "hiii". It didn't enter the first if statement. It works if my directory exist. 2. Relevant notes: The question is here:... (3 Replies)
Discussion started by: spider-man
3 Replies

6. Shell Programming and Scripting

Shell script to monitor new file in a directory and mail the file content

Hi I am looking for a help in designing a bash script on linux which can do below:- 1) Look in a specific directory for any new files 2) Mail the content of the new file Appreciate any help Regards Neha (5 Replies)
Discussion started by: neha0785
5 Replies

7. Shell Programming and Scripting

Automating using shell script : edit the file in a directory

I am trying to automate hadoop installation procedure using shell script. It involves go to perticular directory and add some more lines to the file /etc/sysctl.conf. How this can be done? Regards Navaz (1 Reply)
Discussion started by: Abdul Navaz
1 Replies

8. Shell Programming and Scripting

Shell scripting-I need a script which should watch a directory for a file with specific directory

I need a script which should watch a directory for a file with specific directory. If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column. The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies

9. Shell Programming and Scripting

What is the function of the following lines at the top of a shell script file: Directory and Script?

The file starts like this: Directory: <path to the script> Script: <script fife name> #!bin/ksh ##Comments <actual script> What is the use of the first two lines in the script? What if I save the file without them? What will be the effect? They are not comments. Im very new to this,... (4 Replies)
Discussion started by: remytom
4 Replies

10. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies
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)
All times are GMT -4. The time now is 10:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy