Sponsored Content
Full Discussion: cp - no to all option?
Top Forums UNIX for Dummies Questions & Answers cp - no to all option? Post 302085657 by Glenn Arndt on Friday 18th of August 2006 03:57:37 PM
Old 08-18-2006
Use my favorite command of all time: yes

Code:
yes n | cp -R -h -i /dirone/* /dirtwo

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

-h option

Hi what does the following mean in shell scripts (-h option) val contains a string. while (-h "$val") (1 Reply)
Discussion started by: Raom
1 Replies

2. UNIX for Advanced & Expert Users

su option

We have started to us the su option on our production server. We log in with our own id and then su into a special id to perform various tasks. This allows our actions to be monitored. I need to know how to use the su option when doing an ftp between two servers. I noticed that when I log into... (1 Reply)
Discussion started by: lesstjm
1 Replies

3. Programming

cc option

my yacc output file y.tab.c is not compiling using cc y.tab.c -ly command .possibily option flag -ly is not correct.i m using red hat linux 9.please give solutions. (4 Replies)
Discussion started by: kuldeep_bora
4 Replies

4. Shell Programming and Scripting

which is best searching option

Hi, I need one help for choosing best option among sed, perl and awk. I need to search and replace thousand files for a text and need to replace it. I am in confusion for choosing the option for best results. Because by using sed option its taking too much time for searching and replacing... (3 Replies)
Discussion started by: dbsurf
3 Replies

5. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

6. Programming

g++ and the -R option

hi everybody, can somebody tell me what -R option on g++ on solaris means : g++ -DAIX -fpic -static -o printps printps.o -L/epost2/blitz/xercesc1_1 /lib -L/oracle/OraHome/lib32/ L/epost2/blitz/lib -lxerces-c1_1 -lhmltods -lhmlt ops -lgeneric -lnotify -lutil -lclntsh `cat... (0 Replies)
Discussion started by: eternalflame
0 Replies

7. Shell Programming and Scripting

Can there be a better option?

Hello, I am still in the process of learning Shell Programming. The online manual, that I am referring to had following question: I made a script as follows: df --block-size=1GB | tr -s ' '| cut -d' ' -f2,5 | grep -v 1GB* | sort -k1,2n | tail -1 | cut -d' ' -f2 | cut -d '%' -f1 and it... (2 Replies)
Discussion started by: shahdharmit
2 Replies

8. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

9. Shell Programming and Scripting

-f option and -rf in rm

Hi, I'm new to shell scripting and I'm trying to read some code I need to use. Could you help me out on what it's doing? I read this as.... if the directory has files then rm all the files in that directory. I'm not sure.... if ; then run "rm -rf ${TSP_FILEPATH_PLUGIN_DIR}"; fi run... (8 Replies)
Discussion started by: jdilts
8 Replies

10. Solaris

Unrecognized option: sparc-sun-Solaris2.10/bin/as: unrecognized option `-m32'

Hi, I installed some packages required by an app built with python. But when I try python setup.py install, I get the following error: /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/../../../../sparc-sun-solaris2.10/bin/as: unrecognized option `-m32' Could anyone tell me what's wrong... (4 Replies)
Discussion started by: Kimkun
4 Replies
code(n) 							    [incr Tcl]								   code(n)

__________________________________________________________________________________________________________________________________________________

NAME
code - capture the namespace context for a code fragment SYNOPSIS
itcl::code ?-namespace name? command ?arg arg ...? _________________________________________________________________ DESCRIPTION
Creates a scoped value for the specified command and its associated arg arguments. A scoped value is a list with three elements: the "@scope" keyword, a namespace context, and a value string. For example, the command namespace foo { code puts "Hello World!" } produces the scoped value: @scope ::foo {puts {Hello World!}} Note that the code command captures the current namespace context. If the -namespace flag is specified, then the current context is ignored, and the name string is used as the namespace context. Extensions like Tk execute ordinary code fragments in the global namespace. A scoped value captures a code fragment together with its namespace context in a way that allows it to be executed properly later. It is needed, for example, to wrap up code fragments when a Tk widget is used within a namespace: namespace foo { private proc report {mesg} { puts "click: $mesg" } button .b1 -text "Push Me" -command [code report "Hello World!"] pack .b1 } The code fragment associated with button .b1 only makes sense in the context of namespace "foo". Furthermore, the "report" procedure is private, and can only be accessed within that namespace. The code command wraps up the code fragment in a way that allows it to be exe- cuted properly when the button is pressed. Also, note that the code command preserves the integrity of arguments on the command line. This makes it a natural replacement for the list command, which is often used to format Tcl code fragments. In other words, instead of using the list command like this: after 1000 [list puts "Hello $name!"] use the code command like this: after 1000 [code puts "Hello $name!"] This not only formats the command correctly, but also captures its namespace context. Scoped commands can be invoked like ordinary code fragments, with or without the eval command. For example, the following statements work properly: set cmd {@scope ::foo .b1} $cmd configure -background red set opts {-bg blue -fg white} eval $cmd configure $opts Note that scoped commands by-pass the usual protection mechanisms; the command: @scope ::foo {report {Hello World!}} can be used to access the "foo::report" proc from any namespace context, even though it is private. KEYWORDS
scope, callback, namespace, public, protected, private itcl 3.0 code(n)
All times are GMT -4. The time now is 12:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy