I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain2.com/tgp/
/home/domains/www.domain3.com/tgp/... (1 Reply)
Hi Guys,
I found this script for monitoring the status of a services:
for i in syslogd cron; do
if && ;
then
printf "%-8s" "$i";printf " is alive=A\n"
else
printf "%-8s" "$i";printf " is not alive\n"
fi
The script is working fine except if either syslogd or cron will have a defunct... (3 Replies)
How can I pass in an argument such as "*.k" to a bash script
without having to double-quote *.k and not having *.k
`glob` to match all files in the pattern?
I tried using noglob in my script but this didn't work the way I thought
it would.. expansion is still occuring, $# is higher than I... (3 Replies)
1. Is . wildcard? , the documented wildcard are "*", "?", and ""
. seems mean everything, the follwing cmd will copy everything
cp -r /tmp/test1/. /tmp/test2/
However it doesn't work for rm, why?
$ ls -a
. .. .a .aa aa t2
$ rm -rf .
$ ls -a
. .. .a .aa ... (3 Replies)
Hi,
I want to create a script that gets a filename as an argument.
The script should generate a listing in long list format of the current directory, sorted by file size.
This list must be written to a new file by the filename given on the command line.
Can someone help me with this?
... (6 Replies)
I tried to use the wildcard '*' in my bash script, but I can not get it work. Here is a simple example (list file names in current directory):
ls ./*
does not work in my bash script. But it works if I use
ls ./
So is there any special syntax to use '*' wildcard in bash script (I tested the... (11 Replies)
I am having difficulty with the following script:
#! /bin/bash
filelist=~/data/${1}*
~/./convertFile $filelist ~/temp/outputEssentially, there are a large number of files in the directory ~/data, each with a four-letter code at the beginning (eg. aaaa001 aaaa002 bbbb001 bbbb002 etc). The... (11 Replies)
Just started learning bash ,and I am confused with sintaksis
line 16: syntax error near unexpected token `else'
thanks
#!/bin/bash
echo -n "Enter: "
read num
if(($(echo ${#num}) == 0 ))
then
echo No arguments passed.Try again
elif
rem=$(echo $num | tr -d )
... (7 Replies)
have a script that calls child scripts depending on conditions. All of the child scripts source in a common file that contains shared functions.
At the moment each script has to source this file itself, is there a way for the master script to automagically source the file for them?
For... (3 Replies)
Hi there,
I am pretty new to linux scripting so ..
I am writing a script to loop through all my directories of sequence files in order to do stuff with them (trimming, normalizing, stuff that one would do with sequence files).
Here I need to pick out files that match each other. The files... (10 Replies)
Discussion started by: jahndavik
10 Replies
LEARN ABOUT DEBIAN
gen-ctl-io
GEN-CTL-IO(1) libctl GEN-CTL-IO(1)NAME
gen-ctl-io - generate C interface code for libctl control files
SYNOPSIS
gen-ctl-io [OPTION]... [spec-file]
DESCRIPTION
gen-ctl-io generates C code to import/export the input/output variables used in a libctl control file. gen-ctl-io generates files like
ctl-io.h and ctl-io.c. These files define global variables, data structures, and functions for the input/output variables, classes, and
function interfaces defined in the spec-file argument, automating the interaction between C and Guile.
The arguments such as --code and --header are used to control whether ctl-io.c or ctl-io.h, etcetera, are generated. If no argument is
specified then both of these files are generated by default, for backwards compatibility.
libctl is a free library to aid in interfacing scientific software with the GNU Guile scripting and extension language. Documentation for
it may be found online at the libctl home page: http://ab-initio.mit.edu/libctl
OPTIONS --code Generate C (or C++) source code to implement the Guile interface functions. The default output file name is ctl-io.c (in C) or ctl-
io.cpp (in C++).
--header
Generate the header file declaring the interface data types and functions. The default output file name is ctl-io.h (in C) or ctl-
io.hpp (in C++).
--swig Generate a SWIG interface definition file declaring automatic conversions for the various libctl data types. The default output
file name is ctl-io.i.
--cxx Generate C++ code instead of C code.
-o file
Use file as the output file name instead of the defaults (above).
BUGS
Send bug reports to S. G. Johnson, stevenj@alum.mit.edu.
AUTHORS
Written by Steven G. Johnson.
libctl March 27, 2006 GEN-CTL-IO(1)