04-06-2012
Quote:
Originally Posted by
47shailesh
for script will fail if sub directories have space in their name[..]
If combined with filename expansion, no.
If combined with a file list that has been word split using standard IFS after command substitution, then yes..
This User Gave Thanks to Scrutinizer For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
To anyone who can help greetings,
I am a beginner at Unix shell scripting and am taking a class.
The assignment question is as follows:
use a command-line tool named "itstat" which will display the resolution of an image file and some other lines of information. It accepts a list of image... (1 Reply)
Discussion started by: tech2040
1 Replies
2. Shell Programming and Scripting
To anyone who can help greetings,
I am a beginner at Unix shell scripting.
I need to know how to use the command line tool "itstat".
I understand it's application, however I cannot find any additional information.
Any assistance will be greatly appreciated. (3 Replies)
Discussion started by: tech2040
3 Replies
3. Shell Programming and Scripting
If I did indeed grep something out of it, why woudln't $result show nothing?
When I do $? , it does show success...
What is the proper syntax so that $result shows actual thing it's grepping out?
result=`(ssh $host tail -1 /something/somethingelse) | egrep -i "value" >dev/null`
#echo... (3 Replies)
Discussion started by: convenientstore
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am assaigning the output to the variable outp and when i try to loop thru the variable i see the original content $OUTPUT also in the array outp.
I dont want to have the original content in the array outp.
Please reply.
outp=$(echo $OUTPUT | awk '{FS = "|"}{
for(i=0;i<NF;i++)... (8 Replies)
Discussion started by: vijaykrc
8 Replies
5. UNIX for Dummies Questions & Answers
Hi all and thanks for Your attention.
I need to run this set of commands on a remote machine...
rsh -l barut esfe1
sudo su - tode
tode deng.sh
exit (from rsh)
The problem is that when i rsh (or rlogin) i'm required a password.
How do I input the password (from the script not mannyally).... (4 Replies)
Discussion started by: Ruzeil
4 Replies
6. UNIX for Dummies Questions & Answers
Testing for the presence/absence of a pattern in a file, using /bin/sh:
while read a;
do
b="${a##*pattern*}";
;
done < file
This returns 0 if there's a match. That signal ($?) can then be used outside the loop.
However this method reads through the whole file, even if the match... (2 Replies)
Discussion started by: uiop44
2 Replies
7. Shell Programming and Scripting
Hello,
I have a scenario for which I am trying to write a shell script and I have a question regarding the same. Here's the situation:
I am trying to copy a directory which consists of a few sub-directories and .c and .dat extension files say n number of times so that the copied file have... (3 Replies)
Discussion started by: corntown118
3 Replies
8. Shell Programming and Scripting
Hi guys,
I am wanting to create a script that will logon to HackThisSite.org and complete Programming Mission 11. You can find a link to this mission here for your reference:
www hackthissite org/missions/prog/11/
The following is what I have so far:
#!/bin/bash
USER="myUsername"... (0 Replies)
Discussion started by: spooke
0 Replies
9. UNIX for Dummies Questions & Answers
Unix script coding help?
i am trying to write a code that will display following menu to user:
(A) Add
(B) Subtract
(C) Multiply
(D) Divide
(E) Modulus
(F) Exponentiation
(G) Exit
Then ask user for choice (A-F). After taking users choice ask user for two numbers and
perform... (0 Replies)
Discussion started by: renegade755
0 Replies
10. Shell Programming and Scripting
I tried to run a command which simply generates SSH key with out prompting password.
After several trails , got the below command to run the script :
ssh-keygen -t rsa -N "" -f id_rsa
-N "" tells it to use an empty passphrase (the same as two of the enters in an interactive script)
-f... (0 Replies)
Discussion started by: ulaxmi
0 Replies
DDB(8) BSD System Manager's Manual DDB(8)
NAME
ddb -- configure DDB kernel debugger properties
SYNOPSIS
ddb capture [-M -core] [-N -system] print
ddb capture [-M -core] [-N -system] status
ddb script scriptname
ddb script scriptname=script
ddb scripts
ddb unscript scriptname
ddb pathname
DESCRIPTION
The ddb utility configures certain aspects of the ddb(4) kernel debugger from user space that are not configured at compile-time or easily
via sysctl(8) MIB entries.
To ease configuration, commands can be put in a file which is processed using ddb as shown in the last synopsis line. An absolute pathname
must be used. The file will be read line by line and applied as arguments to the ddb utility. Whitespace at the beginning of lines will be
ignored as will lines where the first non-whitespace character is '#'.
OUTPUT CAPTURE
The ddb utility can be used to extract the contents of the ddb(4) output capture buffer of the current live kernel, or from the crash dump of
a kernel on disk. The following debugger commands are available from the command line:
capture [-M core] [-N system] print
Print the current contents of the ddb(4) output capture buffer.
capture [-M core] [-N system] status
Print the current status of the ddb(4) output capture buffer.
SCRIPTING
The ddb utility can be used to configure aspects of ddb(4) scripting from user space; scripting support is described in more detail in
ddb(4). Each of the debugger commands is available from the command line:
script scriptname
Print the script named scriptname.
script scriptname=script
Define a script named scriptname. As many scripts contain characters interpreted in special ways by the shell, it is advisable to
enclose script in quotes.
scripts
List currently defined scripts.
unscript scriptname
Delete the script named scriptname.
EXIT STATUS
The ddb utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
The following example defines a script that will execute when the kernel debugger is entered as a result of a break signal:
ddb script kdb.enter.break="show pcpu; bt"
The following example will delete the script:
ddb unscript kdb.enter.break
For further examples, see the ddb(4) and textdump(4) manual pages.
SEE ALSO
ddb(4), textdump(4), sysctl(8)
HISTORY
The ddb utility first appeared in FreeBSD 7.1.
AUTHORS
Robert N M Watson
BUGS
Ideally, ddb would not exist, as all pertinent aspects of ddb(4) could be configured directly via sysctl(8).
BSD
December 24, 2008 BSD