10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
this find command works when using manually on the command line
--
$ ls -latr file*.log
-rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_2.log
-rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_1.log
$
$ find . ! -name -prune -type f -name "file*.log" -daystart -mtime 2
./file_1.log
./file_2.log
$... (8 Replies)
Discussion started by: wtolentino
8 Replies
2. UNIX for Beginners Questions & Answers
Hi Guys, I'm trying to work out how to add a command line argument inside single quotes. Would anyone be able to help please as I'm going mad :)
I want to be able to place the filename on command line and it then be used in a script but it needs to have quotes surrounding it.
Thanks in... (4 Replies)
Discussion started by: mutley2202
4 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I am running the script
VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt
result=`cat har1out.mytxt | grep $1'
echo $result
echo $1
{
if
then
echo pass
else
echo fail
fi (2 Replies)
Discussion started by: harsha85
2 Replies
4. Shell Programming and Scripting
Hi Friends,
Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Discussion started by: ramkumarselvam
2 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to pass the variable in the find command like below
a=log.20111114
find /apps/file3_logs/env3/ -name '$a' -exec ls -lrt {} \;
but it's not working
thanks in advance.
Regards
Thelak (3 Replies)
Discussion started by: ajithbe
3 Replies
6. Shell Programming and Scripting
Hello,
Is there any method thorugh which script can take argument if pass otherwise if argument doesn't pass then it takes the argument from the configuration file
i.e I am workiing on a script which will run through crontab and the script will
chekout the code ,zip and copy to the... (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies
7. Shell Programming and Scripting
If ($argv == “-debug”) then
Echo “in loop”
Endif
But this is not working. If I modify this code and remove “-“, then it works.
Similarly I am getting problem using grep command also
Grep “-debug” Filename
Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies
8. Shell Programming and Scripting
I am using csh and getting the error "find: No match." but I cannot figure out why. What I am trying to do is set the find command to a variable and then execute the variable as a command. I ran it through a debugger and it looks like $FIND is getting set but the find command can not actually be... (2 Replies)
Discussion started by: mst3k4l
2 Replies
9. Shell Programming and Scripting
Can someone please help me with this SHELL script?
I need to create a script that gets a positive number n as an argument. The script must calculate the factorial of its argument. In other words, it must calculate n!=1x2x3x...xn. Note that 0!=1.
Here is a start but I have no clue how to... (3 Replies)
Discussion started by: I-1
3 Replies
10. Shell Programming and Scripting
Hello,
I create a file touch 1201093003 fichcomp
and inside a repertory (which hava a lot of files) I want to list all files created before this file :
find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long
but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies