Sponsored Content
Full Discussion: Why doesn't this work?
Top Forums UNIX for Dummies Questions & Answers Why doesn't this work? Post 302755223 by RudiC on Saturday 12th of January 2013 09:28:12 AM
Old 01-12-2013
Running a shell, i.e. creating a new process for each file found may work well on small file counts, but would not be that efficient on large dir trees.
What about using the (deprecated) -path test as Corona688 proposed, execing a mv -t "$dir01"/.LogFiles/ (option -t not present on all systems), followed by a + that collects all filenames found into the mv parameters? Like:
Code:
find . -ipath '*/05_scripts/*.aep Logs'  -exec echo mv -t "$dir01"/.LogFiles/ {} +

. Give it a shot and report results!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why doesn't this work?

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)
Discussion started by: jpeery
2 Replies

2. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

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)
Discussion started by: cheongww
2 Replies

3. Shell Programming and Scripting

ls -d doesn't work on Solaris

Hello, the ls -d command to only list directories in a directory doesn't seem to work on Solaris and the man command says to use that combination: ls -d Anyone have the same problem and find a resolve? Thanks BobK (9 Replies)
Discussion started by: bobk544
9 Replies

4. UNIX for Dummies Questions & Answers

lp -o <option> doesn't work

why lp -o <option> doesn't work on my SCO Unix. (4 Replies)
Discussion started by: wendyz
4 Replies

5. Shell Programming and Scripting

awk -v -- Why doesn't my example work?

Hi. I've been playing around a bit. This isn't for any practical purpose-- it's really just a theoretical exercise. I wrote this little thing: foreach num ( 6 5 4 ) awk -v "number=$num" 'BEGIN{for(x=0;x<$number;x++) printf "-"; printf "\n"}' end I would expect the following output: ... (3 Replies)
Discussion started by: treesloth
3 Replies

6. Shell Programming and Scripting

alias doesn't work

Hi I have put alias ll='ls -la' in .profile file but it doesn't work. On hand it works it looks like the .profile file is not beeing read. How to check whitch file is loaded? ,profile? .bash_profile? My system: SunOS mion 5.10 Generic Shell: /bin/pfksh Thanks (2 Replies)
Discussion started by: miojamo
2 Replies

7. Shell Programming and Scripting

if condition doesn't work

i want to get the value for column 4rth when i =4. please guide what i am doing wrong. thanks var=`cat file.csv` for i in $var; do { if ; then var4=$var4+$i fi echo $i } done I am geting this error message "0403-009 The specified number is not valid for this command." (8 Replies)
Discussion started by: sagii
8 Replies

8. HP-UX

Sudo doesn't work

I edited sudoers like this:vi /etc/sudoers subex ALL =(root) NOPASSWD: /usr/ccs/bin/pstack But the respective user still is prompted for password, and even when the right password is used, the command is still not launched.$sudo usr/ccs/bin/pstack 26557 We trust you have received the usual... (5 Replies)
Discussion started by: black_fender
5 Replies

9. Shell Programming and Scripting

-ne 0 doesn't work -le does

Hi, I am using korn shell. until ] do echo "\$# = " $# echo "$1" shift done To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work. Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
inviso_lfm(3erl)					     Erlang Module Definition						  inviso_lfm(3erl)

NAME
inviso_lfm - An Inviso Off-Line Logfile Merger DESCRIPTION
Implements an off-line logfile merger, merging binary trace-log files from several nodes together in chronological order. The logfile merger can also do pid-to-alias translations. The logfile merger is supposed to be called from the Erlang shell or a higher layer trace tool. For it to work, all logfiles and trace information files (containing the pid-alias associations) must be located in the file system accessible from this node and organized according to the API description. The logfile merger starts a process, the output process, which in its turn starts one reader process for every node it shall merge logfiles from. Note that the reason for a process for each node is not remote communication, the logfile merger is an off-line utility, it is to sort the logfile entries in chronological order. The logfile merger can be customized both when it comes to the implementation of the reader processes and the output the output process shall generate for every logfile entry. EXPORTS
merge(Files, OutFile) -> merge(Files, WorkHFun, InitHandlerData) -> merge(Files, BeginHFun, WorkHFun, EndHFun, InitHandlerData) -> {ok, Count} | {error, Reason} Types Files = [FileDescription] FileDescription = FileSet | {reader,RMod,RFunc,FileSet} FileSet = {Node,LogFiles} | {Node,[LogFiles]} Node = atom() LogFiles = [{trace_log,[FileName]}] | [{trace_log,[FileName]},{ti_log,TiFileSpec}] TiFileSpec = [string()] - a list of one string. FileName = string() RMod = RFunc = atom() OutFile = string() BeginHFun = fun(InitHandlerData) -> {ok, NewHandlerData} | {error, Reason} WorkHFun = fun(Node, LogEntry, PidMappings, HandlerData) -> {ok, NewHandlerData} LogEntry = tuple() PidMappings = term() EndHFun = fun(HandlerData) -> ok | {error, Reason} Count = int() Reason = term() Merges the logfiles in Files together into one file in chronological order. The logfile merger consists of an output process and one or several reader processes. Returns {ok, Count} where Count is the total number of log entries processed, if successful. When specifying LogFiles , currently the standard reader-process only supports: * one single file * a list of wraplog files, following the naming convention <Prefix><Nr><Suffix> . Note that (when using the standard reader process) it is possible to give a list of LogFiles . The list must be sorted starting with the oldest. This will cause several trace-logs (from the same node) to be merged together in the same OutFile . The reader process will simply start reading the next file (or wrapset) when the previous is done. FileDescription == {reader,RMod,RFunc,FileSet} indicates that spawn(RMod, RFunc, [OutputPid,LogFiles]) shall create a reader process. The output process is customized with BeginHFun , WorkHFun and EndHFun . If using merge/2 a default output process configuration is used, basically creating a text file and writing the output line by line. BeginHFun is called once before requesting log entries from the reader processes. WorkHFun is called for every log entry (trace message) LogEntry . Here the log entry typically gets writ- ten to the output. PidMappings is the translations produced by the reader process. EndHFun is called when all reader processes have terminated. Currently the standard reader can only handle one ti-file (per LogFiles ). The current inviso meta tracer is further not capable of wrapping ti-files. (This also because a wrapped ti-log will most likely be worthless since alias associations done in the beginning are erased but still used in the trace-log). The standard reader process is implemented in the module inviso_lfm_tpreader (trace port reader). It understands Erlang linked in trace-port driver generated trace-logs and inviso_rt_meta generated trace information files. WRITING YOUR OWN READER PROCESS
Writing a reader process is not that difficult. It must: * Export an init-like function accepting two arguments, pid of the output process and the LogFiles component. LogFiles is actually only used by the reader processes, making it possible to redefine LogFiles if implementing an own reader process. * Respond to {get_next_entry, OutputPid} messages with {next_entry, self(), PidMappings, NowTimeStamp, Term} or {next_entry, self(), {error,Reason}} . * Terminate normally when no more log entries are available. * Terminate on an incoming EXIT-signal from OutputPid . The reader process must of course understand the format of a logfile written by the runtime component. Ericsson AB inviso 0.6.2 inviso_lfm(3erl)
All times are GMT -4. The time now is 07:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy