Using solaris 2.5.1, and how can I get a summary of the size of each subdirectory, say for /export/home, all the users? usually I do a du -sk dirname but I have to manually type in each name, is there a better way?
Thanks, (3 Replies)
cat .servers | while read LINE; do
ssh jason@$LINE $1
done
exit 1
./command.ksh "ls -l ~jason"
Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing?
Thanks!
JP (2 Replies)
without using ls, just using echo so purely pattern matching
I can say echo */ <-- lists directories
but how would I match files? surely something like *!/ or * but neither work ?
it seems like there isn't much that I can put in but surely i should be able to put any ascii... (1 Reply)
Howdie everyone...
I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*
My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
how do i check a file for a pattern and perform an action if it doesn't exist?
i know how to search a file for a pattern. you just place it in an array like so.
#!/usr/bin/perl
my $data_file = "file.txt";
open DATA, "$data_file";
my @array_of_data = <DATA>;
if ($_ =~ m/pattern/i) {... (4 Replies)
Hello all,
Something strange going on with a shell script I'm writing. It's trying to write a list of files that it finds in a given directory to another file. But I also have a skip list so matching files that are in that skip list should be, well uhm, skipped :)
Here's the code of my... (2 Replies)
Hi Gurues,
I need to modify an existing script that uses find to search a folder, and then move its contents to a folder. What I need to do is run gzip on each file after it's moved.
So, I ran this little test:
Put a ls.tar file on my $HOME, mkdir tmp, and then:
virtuo@tnpmprd01: find .... (3 Replies)
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Discussion started by: urello
8 Replies
LEARN ABOUT DEBIAN
ocamldsort
OCAMLDSORT(1) General Commands Manual OCAMLDSORT(1)NAME
ocamldsort - Dependency sorter for OCaml source files
SYNOPSIS
ocamldsort [ -pp pre-command ] [ -d dep-command ]
[ -mli ] [ -nox ] [ -obj | -byte | -opt ] [ filename ] ...
DESCRIPTION
The ocamldsort(1) command scans a set of Objective Caml source files (.ml and .mli files), sorts them according to their dependencies and
prints the sorted files in order to link their corresponding .cmo files.
For ocamldsort(1) to work it must get a list of dependencies generated by ocamldep(1), if the standard input to ocamldsort(1) has been
redirected then ocamldsort assumes that this is a dependency file generated by ocamldep(1). Otherwise ocamldsort calls ocamldep(1) to gen-
erate the dependency list itself. In either case the source files to be sorted should be given as arguments to the ocamldsort(1) command.
ocamldsort(1) can be used to compile and link simple projects with one command, such as:
ocamlc $(ocamldsort *.ml)
if your project doesn't contain .mli files or:
ocamlc -c $(ocamldsort -mli *.ml *.mli) && ocamlc $(ocamldsort -byte *.ml)
if it contains .mli files.
However for larger projects where separate compilation is desirable, ocamldsort(1) can also be used from within a makefile. Here is a typi-
cal makefile example:
TARGET=my_program
OCAMLC=ocamlc
OCAMLOPT=ocamlopt
OCAMLDEP=ocamldep
OCAMLDSORT=ocamldsort
PPFLAGS=-pp camlp4o
MLY=$(shell echo *.mly)
MLL=$(shell echo *.mll)
GENERATED_ML=$(MLY:.mly=.ml) $(MLL:.mll=.ml)
include .generated .depend .ocamldsort
$(TARGET): $(CMO_FILES)
$(OCAMLC) $(COMPFLAGS) $(LIBS) $^ -o $@
$(TARGET).opt: $(CMX_FILES)
$(OCAMLOPT) $(COMPFLAGS) $(LIBS_OPT) $^ -o $@
.generated: $(GENERATED_ML)
@touch .generated
.depend: .generated
$(OCAMLDEP) *.ml *.mli > $@
.ocamldsort: .depend
echo CMO_FILES=`< .depend $(OCAMLDSORT) -byte *.ml` > .ocamldsort
echo CMX_FILES=`< .depend $(OCAMLDSORT) -opt *.ml` >> .ocamldsort
distclean: clean
rm -f .generated .depend .ocamldsort
rm -f $(GENERATED_ML)
rm -f *~
rm -f $(TARGET)
clean:
rm -f *.cmo *.cmi *.cmx *.o
.SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly
%.cmi:%.mli
$(OCAMLC) $(PPFLAGS) $(COMPFLAGS) -c $<
%.cmo:%.ml
$(OCAMLC) $(PPFLAGS) $(COMPFLAGS) -c $<
%.cmi %.cmo:%.ml
$(OCAMLC) $(PPFLAGS) $(COMPFLAGS) -c $<
%.cmx %.o:%.ml
$(OCAMLOPT) $(PPFLAGS) $(COMPFLAGS) -c $<
%.ml:%.mll
$(OCAMLLEX) $<
%.mli %.ml:%.mly
$(OCAMLYACC) -v $<
OPTIONS
The following command-line options are recognized by ocamlsort(1):
-I directory
Add the given directory to the list of directories searched for source files.
-pp pre-command
Command to preprocess file.
-d dep-command
Command to compute dependencies. ocamldep(1) by default.
-mli Sort files using mli dependencies.
-nox Ignore filenames containg `*' so that unexpanded wildcards are ignored.
-obj Print bytecode filenames (.cmo and .cmi) (deprecated: use -byte).
-byte Print bytecode filenames (.cmo and .cmi).
-opt Print opt filenames (.cmx and .cmi).
-v Output version information and exit.
-help, --help
Output help and exit.
SEE ALSO ocamldep(1).
OCAMLDSORT(1)