01-11-2013
Why doesn't this work?
find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \;
Returns this failure:
mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory
I don't know why it's trying to use the "/*.aep\ Logs" in the target directory.
If it key in the command generated manually it works fine.
mv -f ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/
Works perfectly.
Moderator's Comments:
|
|
Please don't use these types of non detailed subject lines - Why doesn't this work? . This is strictly against forum rules and you will receive a reminder/warning next time. Please read the rules of the forums again.
|
|
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
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
why lp -o <option> doesn't work on my SCO Unix. (4 Replies)
Discussion started by: wendyz
4 Replies
5. Shell Programming and Scripting
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
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
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
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
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
LEARN ABOUT LINUX
inviso_lfm_tpfreader
inviso_lfm_tpfreader(3erl) Erlang Module Definition inviso_lfm_tpfreader(3erl)
NAME
inviso_lfm_tpfreader - Inviso Standard Reader Process to Standard Logfile Merger
DESCRIPTION
Implements the standard reader process to the standard logfile merger inviso_lfm .
The reader process reads logfiles belonging to the same set (normally one node) in chronological order and delivers logged trace messages
one by one to the output process. Before any trace messages are delivered, the inviso_lfm_tpreader implementation reads the entire trace
information file (if in use) and builds a database over pid-to-alias associations.
The inviso_lfm_tpreader implementation is capable of considering that an alias may have been used for several processes during different
times. An alias may also be in use for several pids at the same time, on purpose. If a process has generated a trace message, all associa-
tions between that pid and aliases will be presented as the list PidMappings in the message sent to the output process.
EXPORTS
handle_logfile_sort_wrapset(LogFiles) -> FileList2
Types LogFiles = [{trace_log, FileList}]
FileList = FileList2 = [FileName]
FileName = string()
Only one {trace_log, FileList} tuple is expected in LogFiles , all other tuples are ignored. FileList must:
* contain one single file name, or
* a list of wraplog files, following the naming convention <Prefix><Nr><Suffix> .
Sorts the files in FileList in chronological order beginning with the oldest. Sorting is only relevant if FileList is a list of
wraplogs. The sorting is done on finding the modulo-counter in the filename and not on filesystem timestamps.
This function is exported for convenience should an own reader process be implemented.
THE TRACE INFORMATION FILE PROTOCOL
The format of a trace information file is dictated by the meta tracer process. The inviso_lfm_tpfreader implementation of a reader process
understands the following trace information entries. Note that the inviso_rt_meta trace information file is on binary format prefixing
every entry with a 4 byte length indicator.
{Pid, Alias, alias, NowStamp} :
Pid = pid()
Alias = term()
NowStamp = term() , but in current implementation as returned from erlang:now/0
This message indicates that from now on shall Pid be associated with Alias .
{MaybePid, Alias, unalias, NowStamp} :
MaybePid = pid() | undefined
Alias = term()
NowStamp = term() , see above
This message indicates that, if MaybePid is a pid, this pid shall no longer be associated with Alias . If it is undefined , all associ-
ations with Alias from now shall be considered invalid.
Also note that there are many situations where unalias entries will be missing. For instance if a process terminates without making
explicit function calls removing its associations first. This is seldom a problem unless the pid is reused.
Ericsson AB inviso 0.6.2 inviso_lfm_tpfreader(3erl)