1
vote
3answers
68 views

How to write alias to use first parameter or * if parameter is blank?

I want to write an alias command for 'ls', so that if I pass in a parameter, then the alias will use it, but if I do not, then it would use '*' instead. This is the alias I have today: alias lsd='ls ...
3
votes
1answer
123 views

How can aliases of a folder be found using cmd?

Is it possible to find the aliases that correspond to a certain folder (and perhaps its sub-directories, too) using Windows cmd? I've tried searching, but it gives me results related to creating ...
2
votes
2answers
201 views

Working shell command doesn't alias

I can run, svn status |grep -v .jasper$ |cut -d ' ' -f8 |sed '/.*\..*/!d' |xargs ls -altr --color=auto just fine. But when I go to add this as an alias (alias svtr="...") I get an error saying... ...
0
votes
2answers
158 views

What is a simple standard command line way of getting 'ls' to produce file permission in octal?

Any know a standard way, other than 'stat' to produce octal output for file permission from 'ls'? Standard way of using stat (on OSX) is: stat -f '%A %a %N' * where * can be any file pattern that ...
4
votes
2answers
960 views

Create an alias to a samba share from the command line

I'm currently wanting to deploy a setup to around 300 Macs. I have all of it scripted and ready to deploy, excepting that I'm having trouble creating a working alias to a samba share from the command ...
1
vote
0answers
541 views

Running Windows XP Command Line from CMD.exe does not load autorun processor batch file

I have a batch file set to load up when the Windows XP command line (cmd.exe) starts (using the registry key Command Processor as detailed). Unexpectedly, the batch file only runs under certain ...
0
votes
1answer
692 views

Create Command line shortcuts in Windows 7

I'm using jsDoc to create documentations for my JavaScript files. The command I use is > java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js What I want is to create a batch or ...
0
votes
3answers
999 views

Launch application from bash terminal then kill terminal while leaving application running

I would like to use the following scenario for my favorite applications under Linux (Ubuntu 10.10) in order to save grabbing the mouse and clicking them: Open a terminal (Ctrl-Alt-D) Type my alias ...
2
votes
1answer
307 views

How to pipe output of certain commands to a pager with zsh?

I am frequently working with subversion in console using its client svn. One of common tasks is viewing svn log; however its output is usually pretty massive despite of --limit option. I would like to ...
3
votes
2answers
2k views

How do I close an OS X application from the command line using a alias defined in my .bash_profile?

I found the following shell script that can be used to tell an OS X application to quit: #!/bin/sh echo | osascript <<EOF tell application "$*" quit end tell EOF I have several simple ...
3
votes
2answers
1k views

How to undo alias, PATH=$PATH:./Test - (Unix)

1.) In a terminal when we make an alias for any command line,the life of that alias is as long as the terminal is open. alias new_command=old_command example: alias dog=cat But can we explicitly ...
1
vote
3answers
174 views

What is the return value of a complex alias in bash?

When I execute a command that has been alias to a series of commands, what value gets returned back to the shell? Also, assuming I have an alias defined like this: alias doit 'cd ~/some/dir; ...
12
votes
9answers
8k views

Command aliases in Command Prompt?

How can I make command aliases in Windows' Command Prompt like I would with bash? I found out about doskey in a forum thread, so I can do something like: doskey ls=dir /b ...and now the command ls ...
3
votes
5answers
1k views

error when using commandline as a bash alias on linux

I want to save the following commandline sequence as a bash alias: grep `date '+%d/%b/%Y'` access.logs | egrep 2765330645ae47d292c9ceac725d744e.py |awk '{print $1, $4, $5, $7, $8, $9, $10}' | sort ...