Sponsored Content
Top Forums UNIX for Dummies Questions & Answers cp command not working with alias Post 302561206 by Scott on Monday 3rd of October 2011 01:28:37 PM
Old 10-03-2011
Hi.

From the "BASH" man page:

Code:
ALIASES
       Aliases allow a string to be substituted for a word when it is used  as
       the  first  word  of  a  simple command.

If you want to use "deploy" as an argument to "cp" (in this case as the target directory(Smilie), then you should use a variable (say, "DEPLOY")

Code:
$ DEPLOY=/usr/local/tomcat/webapp

$ cp app.war "$DEPLOY"

This User Gave Thanks to Scott For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Alias a command

Hi 'm executing a java program from my shell script on solaris 9 as $JAVA_HOME\bin\java -ms32m -mx128m -classpath $CLASSPATH com.abc.fwk,abcServer.abcfwkServer $1 & where $1 is port number when i do ps -ef, it shows whole command , i want to give this some alias name as abcProcess, so... (2 Replies)
Discussion started by: b_garima
2 Replies

2. UNIX for Dummies Questions & Answers

alias not working in scripts

Hi All, PF below details, > cat run.sh #!/usr/bin/ksh alias ll="ls -l" > ./run.sh > ll ksh: ll: not found. Pls help on this? Thanks in Advance, Naga :cool: (2 Replies)
Discussion started by: Nagapandi
2 Replies

3. UNIX for Dummies Questions & Answers

alias command not working after re-login

i create some alias in .cshrc file then i run source .cshrc to refresh it, the alias command work fine but when i relogin again, the alias command is not working... i need to re-run the source .cshrc command so that the alias only workable. any idea on it? (7 Replies)
Discussion started by: lsy
7 Replies

4. Solaris

Alias not working

Hello, I am trying to set an alias in my .kshrc or .profile and when I do it is not setting. If I do it manually it works fine. Is there another file I should put this in? Here is the alias I am using. alias ll='ls -ltr' I am using solaris 9. When I type alias it does not show these... (5 Replies)
Discussion started by: dkranes
5 Replies

5. Solaris

Simple question: alias not working for root

OS = Solaris 8 Issue: alias not working for root, but working for regular users # grep root /etc/passwd root:x:0:1:Super-User:/:/sbin/sh # alias dir=ls # dir dir: not found # alias dir="ls -l" # dir dir: not found # alias dir='ls -l' # dir dir: not found # alias... (2 Replies)
Discussion started by: aixlover
2 Replies

6. Red Hat

[SOLVED] How the alias is working?

Iam facing some strange issue with alias. I have an alias file in which i have created lot of aliases as given below. export BUILD_HOME=/apps/psr/build export DB_HOME=/apps/psr/database export LOGS_HOME=/apps/psr/logs export BUILD_TEST=/apps/psr/build_dev/build_test export... (0 Replies)
Discussion started by: Vikram_Tanwar12
0 Replies

7. Solaris

Alias not working

Hi, I'm on Solaris (SunOS wsp2cm01 5.10 Generic_150400-10 sun4v sparc SUNW,Sun-Fire-T200). Trying to set up an alias like below - alias grep="/usr/xpg4/bin/grep"but when I call grep in my command it ignores my alias & uses /usr/bin/grep instead. The problem with /usr/bin/grep is that it doesn't... (24 Replies)
Discussion started by: nexional
24 Replies

8. Solaris

Alias is not working under Bourne Shell

Hi, Please assist me why HC alias is not working under this shell? root@singapore # grep HC /.profile alias HC='cd /var/tmp/HC/2015/`date +%B`' root@singapore # . /.profile Sourcing //.profile-EIS..... root@singapore # echo $HC root@singapore # HC HC: not found root@singapore # echo... (18 Replies)
Discussion started by: tprabhu1983
18 Replies

9. Shell Programming and Scripting

Alias not working

I have several shell scripts which contain the nawk command. Here is what i m doing assign the correct value to nawk as nawk is not found on a new systems. Here is what i did. more test.sh ] && alias nawk=/usr/bin/gawk ] && alias nawk=/usr/bin/nawk ] && alias nawk=/usr/bin/awk... (7 Replies)
Discussion started by: mohtashims
7 Replies

10. UNIX for Beginners Questions & Answers

Lost with this alias why it is not working

Hi, I have the following aliases: $: alias | grep "^du=" du='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn' $: alias | grep "^dutop10=" dutop10='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn | head... (2 Replies)
Discussion started by: newbie_01
2 Replies
mdoc(1) 						      General Commands Manual							   mdoc(1)

NAME
mdoc - Mono documentation management tool SYNOPSIS
mdoc command [options] [args] OVERVIEW
mdoc is an assembly-based documentation management system. mdoc permits creating and updating documentation stubs based on the contents of an assembly. It does not rely on documentation found within the source code. The advantages are: * Code readability. Good documentation is frequently (a) verbose, and (b) filled with examples. (For comparison, compare Microsoft .NET Framework documentation, which is often a page or more of docs for each member, to JavaDoc documentation, which can often be a sentence for each member.) Inserting good documentation into the source code can frequently bloat the source file, as the documentation can be longer than the actual method that is being documented. * Localization. In-source documentation formats (such as csc /doc) have no support for multiple human languages. If you need to sup- port more than one human language for documentation purposes, mdoc is useful as it permits each language's output to reside in its own directory, and mdoc can add types/members for each separate documentation directory. * Administration. It's not unusual to have separate documentation and development teams. It's also possible that the documentation team will have minimal experience with the programming language being used. In such circumstances, inline documentation is not desirable as the documentation team could inadvertantly insert an error into the source code while updating the documentation. Alternatively, you may not want the documentation team to have access to the source code for security reasons. mdoc allows the doc- umentation to be kept completely separate and distinct from the source code used to create the assembly. Documentation can be generated using the mdoc update command: mdoc update -o docs/en ProjectName.dll Once the documentation stubs have been generated (and hopefully later filled in with actual documentation), there are three ways to view the documentation: * To generate a simple directory of HTML pages (one HTML file per type), use mdoc export-html: mdoc export-html -o /srv/www/htdocs/ProjectName docs/en * To use an ASP.NET webapp to display the sources, see: http://anonsvn.mono-project.com/source/trunk/monodoc/engine/web/. From a monodoc source checkout, you can do this: cd engine make web This will use xsp(1) to serve the ASP.NET webapp; Visit http://localhost:8080/ to view the documentation. * To use the monodoc(1) documentation browser, you must first assemble the documentation: mdoc assemble -o ProjectName docs/en The above command creates the files ProjectName.tree and ProjectName.zip. An additional ProjectName.sources file must be provided which describes where in the help system the documentation should be hooked up; it is a very simple XML file, like this: <?xml version="1.0"?> <monodoc> <source provider="ecma" basefile="ProjectName" path="various" /> </monodoc> The above configuration file describes that the documentation is in ECMA format, that the base file name is ProjectName and that it should be hooked up in the "various" part of the documentation tree. If you want to look at the various nodes defined in the docu- mentation, you can look at the monodoc.xml file which is typically installed in /usr/lib/monodoc/monodoc.xml. Once you have all of the required files (.zip, .tree and .sources) you can install them into the system with the following command: cp ProjectName.tree ProjectName.zip ProjectName.source `pkg-config monodoc --variable sourcesdir` The above will copy the files into the directory that Monodoc has registered; you might need root permissions to do this. The actual directory is returned by the pkg-config invocation. MDOC COMMANDS
mdoc assemble Compiles documentation for use within the monodoc(1) browser. See the mdoc-assemble(1) man page for details. mdoc export-html Exports documentation into a directory structure of HTML files. See the mdoc-export-html(1) man page for details. mdoc export-msxdoc Exports documentation into the single-file Microsoft XML Documentation format. See the mdoc-export-msxdoc(1) man page for details. mdoc help View internal help for a given command. mdoc help assemble is equivalent to: mdoc assemble --help Multiple sub-commands may be listed at once: mdoc help assemble export-html update validate mdoc update Updates documentation, adding and removing members based upon a reference assembly. See the mdoc-update(1) man page for details. mdoc validate Validates the documentation against the Mono documentation schema. See the mdoc-validate(1) man page for details. SEE ALSO
mdoc(5), mdoc-assemble(1), mdoc-export-html(1), mdoc-update(1), mdoc-validate(1) MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details. WEB SITE
Visit http://www.mono-project.com/mdoc for details mdoc(1)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy