10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to make a dialog window that prints the output of grep that takes the output of find. Unfortunately my nested backticks don't work.
Here is the dialog window:
dialog --stdout --title "test" --backtitle "test" --msgbox "Test:\n `grep -l "${tablica}" `find $string``" 16 60I think I... (2 Replies)
Discussion started by: Starting_Leaf
2 Replies
2. Shell Programming and Scripting
Hi,
What is the difference between the following commands
find . -type f -exec grep 'abc' {} \;
and
find . -type f | xargs grep 'abc'
Appreciate your help. (2 Replies)
Discussion started by: bobbygsk
2 Replies
3. Shell Programming and Scripting
I have been testing a new script and cannot figure out why my `cat spath` will not execute on the remote machine?
sudo ssh -p 22344 -o "PasswordAuthentication no" -o "HostbasedAuthentication yes" -l testuser 192.168.1.6 "find `cat spath` -depth"
cat: spath: No such file or directory
but... (0 Replies)
Discussion started by: metallica1973
0 Replies
4. Programming
I have read several docs on these on the web and looked at examples. I can't figure out the difference. In some cases you use one or the other or you combine them.
can someone help me understand this? (1 Reply)
Discussion started by: guessingo
1 Replies
5. Shell Programming and Scripting
I'm always concerned I might be abusing backticks within my scripts. A current script I'm writing has this for example:
stripscriptname=`echo $scriptname | sed 's/\(.*\)\..*/\1/'`
stripsearch=`echo $searchpattern | tr -d ' ,/'`
Both of these variables are set inside the script (in fact,... (2 Replies)
Discussion started by: mglenney
2 Replies
6. AIX
Hi ,
Can somebody explain what is the difference in the below commands.. when using Xargs its giving all the hidden files and is it something xargs will do recursive searching or parsing ?
find . -type f -links 1 | xargs ls -li
find . -type f -links 1 | ls -li (1 Reply)
Discussion started by: Karthikeyan K
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I would like to change some lines in my mysql-dump, because there a syntax problems with some version of mysql.
I 'd like to change
USE ´someDatabase´;
to
USE someDatabase;
(without backticks) using the sed command in the shell
Thanks & best regards
Bernd (5 Replies)
Discussion started by: bjb
5 Replies
8. Shell Programming and Scripting
Hi, I'm trying to do something like this: range= `expr `date '+%m'` - 1` and it does not work. How can I tell it to evaluate an expression within another expression evaluation? I was at first worried that `date '+%m'` would return a string but apparently expr does the math okay normally, so the... (3 Replies)
Discussion started by: jeriryan87
3 Replies
9. Shell Programming and Scripting
Can someone explain the difference between backticks and system when
evaluated in these if statements:
sub getDate {
print "start date\n";
if ( system("/bin/date") ) {
print "can't get date\n";
exit(2);
}
print "finish date\n";
}
Returns the following:
start date
Thu... (5 Replies)
Discussion started by: gjkeenan
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have tried both the options in small dummy scripts, but somehow i can't differentiate between the two.
find . -name H* -exec ls -l {} \;
find . -name H* | xargs ls -l
Both work the ditto way.
Any help is appreciated. (19 Replies)
Discussion started by: vibhor_agarwali
19 Replies