Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to ? same alias should respond differently based on current folder Post 302834215 by DGPickett on Thursday 18th of July 2013 01:26:25 PM
Old 07-18-2013
Not just an alias, but a sourced script in your path could also extract the project name for $PWD and add the script dir to the head of the $PATH. You could even build this into your ~/.profile or the like.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Pack current folder

How do I pack (using tar zcvf ?) the current folder inluding all files and folders ?? I need to be sure to get all files and folders/subfolders... Later I will unpack into a new folder on a new server.. Appreciate any help.. (3 Replies)
Discussion started by: WebWatch
3 Replies

2. Shell Programming and Scripting

Use awk to create new folder in current directory

Alright, I am sure this is a laughable question, but I don't know so I am going to ask anyway. I have a little script I am writing to take information from one source, recode it in a certain way, and print to files for each subject I have data for. This all works perfectly. I just want to put... (6 Replies)
Discussion started by: ccox85
6 Replies

3. Shell Programming and Scripting

How to find files in current folder only?

How do I find files in current folder only? We are on AIX 5.3, so maxdepth is not supported. I tried to do this find /dir1/dir2/dir3/dir4 -prune -type f to display all files in /dir1/dir2/dir3/dir4 only but it does not show any files. Somehow the -prune option works for dir3 level... (7 Replies)
Discussion started by: Hangman2
7 Replies

4. UNIX for Dummies Questions & Answers

Zip recursive content of folder when (not current directory=

Hi, Is there a way to zip the content (recursively) of a folder other then the current directory, and keep the directory structure intact? Example: /var/tmp/myfolder ----------------- file1 ----------------- file2 ----------------- folder1 ------------------------ file3 Now I want... (3 Replies)
Discussion started by: jimih
3 Replies

5. Shell Programming and Scripting

Getting current folder name appended to all desired files

Hello everyone, Just registered here, I'm kinda new to Unix :o I've been trying to automate some processes with various Windows tools. I found that using unix scripts the result would be closest to my needs. So I installed Cygwin on Windows 7. My folders and files are structured like this:... (7 Replies)
Discussion started by: c_bg1
7 Replies

6. UNIX for Dummies Questions & Answers

Search current folder and subfolders with grep

Hello, Neither ‘Grep -r' nor ‘grep -R' is working in my environment. (Searching for a text pattern in the files) Any suggestions... Using SunOS 5.9 Thanks, Trinanjan. (1 Reply)
Discussion started by: bhanja_trinanja
1 Replies

7. UNIX for Dummies Questions & Answers

tar file from current folder

Hello guys, I am sure this has been asked before, but honestly, I cant find post talking about it. Here is what I need: - A tar file will be generated manually by user - This tar file is then used within a bash shell script My source folder structure is like this: ... (2 Replies)
Discussion started by: manolain
2 Replies

8. Emergency UNIX and Linux Support

List matching directories in current folder only on AIX

Hi, I need to find the list of matching direcories in current folder only and no subfolders on AIX.I tried -maxdepth option but its not working. Also, tried ls -d option to list the matching directories but getting argument list too long... So, any help would be appreciated. (6 Replies)
Discussion started by: sachinkl
6 Replies

9. Shell Programming and Scripting

Delete oldest folder based on folder named as date

Hi, I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content. for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
0ALIAS(1)																 0ALIAS(1)

NAME
0alias -- create quick scripts to run 0launch SYNOPSIS
0alias ALIAS [INTERFACE [MAIN]] DESCRIPTION
Having to keep typing the full URI for a program each time you want to run it with 0launch is annoying. 0alias will create a little script in your PATH to do it for you. Note: the newer "0install add" command provides a more efficient alternative to using aliases. EXAMPLES
A program can be invoked using 0launch: 0launch http://rox.sourceforge.net/2005/interfaces/Edit To avoid having to keep entering the URI, create an alias: 0alias rox-edit http://rox.sourceforge.net/2005/interfaces/Edit To run Edit now: rox-edit To select a different version, or check for updates: 0alias rox-edit If an interface provides more than one program, you can specify which one to use instead of the default. e.g. 0alias svn http://example.com/subversion 0alias svnadmin http://example.com/subversion svnadmin (this is for older programs that use MAIN; for newer programs you may need to use --command instead) COMMAND-LINE OPTIONS -c=COMMAND, --command=COMMAND The generated script will execute COMMAND rather than the default ("run"). -d=DIR, --dir=DIR Install the script into directory DIR, rather than searching for a suitable directory in $PATH. -h, --help Show the built-in help text. -m, --manpage Display the manpage for the alias script given as the single argument. The alias can be an absolute pathname, or the name of a script in $PATH. If the argument isn't an alias script, or if multiple arguments are given, then all arguments are passed to the system 'man' command. This allows you to alias your man command like this: alias man='0alias --manpage' -r, --resolve Print the interface URI for the given alias script to stdout. -V, --version Display version information. LICENSE
Copyright (C) 2012 Thomas Leonard. You may redistribute copies of this program under the terms of the GNU Lesser General Public License. BUGS
Please report bugs to the developer mailing list: http://0install.net/support.html AUTHOR
The Zero Install Injector was created by Thomas Leonard. SEE ALSO
0install(1), 0launch(1), 0desktop(1) The Zero Install web-site: http://0install.net Thomas Leonard 2012 0ALIAS(1)
All times are GMT -4. The time now is 05:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy