Skip to main content

All Questions

Tagged with
2 votes
1 answer
75 views

Alias + and - in zsh?

For years I've used + and - as aliases for pushd and popd in both csh and bash. I've finally given up on my Macs and want to switch to zsh but I haven't been able to find a way to make these aliases. ...
sfjac's user avatar
  • 123
0 votes
0 answers
42 views

Last login command, alias in csh

In the C shell, how can we display the login history of a particular user using an alias in such a way that the user only enters the alias name and the number of lines to be displayed without typing ...
learner's user avatar
0 votes
0 answers
205 views

using 2 alias together in cshell terminal

lets say I have 2 aliases, each having multiple arguments. It looks somewhat like below example alias s1 "command1 -a -b -c" alias s2 "command2 -d -e -f" now if I run :s1 s2 in ...
Krishanu Banerjee's user avatar
1 vote
1 answer
701 views

How can I get my csh alias to work in bash?

This alias works fine in /bin/csh but not in /bin/bash: alias cd='chdir !* && setprompt; clear; ls -F' Basically, I would like to cd to any directory and ls in color.
Ivan Amador's user avatar
0 votes
1 answer
1k views

Can't create an alias in tcsh shell when trying to sed some string with .*

I'm trying to create this alias in tcsh shell: alias repeat 'zgrep -i __NCELAB_SNAPSHO \!* | grep -v make | grep -v Flags | sed 's#CODE_COVERAGE_TYPES.*TEST_DONE=1##g'' And getting an error: alias:...
user1980750's user avatar
2 votes
3 answers
4k views

How can I dynamically change a path in my aliases?

I have a bunch of aliases in my .cshrc file which use the path: /projects/project_name/my_name/$CLIENT I've written a short script which is intended to take a folder name from my working directory ...
tombam95's user avatar
  • 121
1 vote
2 answers
173 views

Why can't tcsh do a single-line 'which -> vim' command?

I often have to do which command, and then open it in vim to actually see what's inside. I'd like to have an alias or function that does this, with tab completion. Here's what I've tried: superwhich()...
user avatar
0 votes
1 answer
1k views

error while using sed in tcsh alias

I am unable to "source/run" my tcsh alias, which is as below: alias inp1 "grep -i "final_model" /scr/cb2TempProd/tmp/$USER/\!:1/Simulation/Input/assemble.preprocessing | sed 's#.*<##; s/>$//'" ...
Nayak's user avatar
  • 65
3 votes
1 answer
3k views

OpenBSD - How does one set an alias?

I am running the latest OpenBSD and I cannot figure out how to set a simple alias, something along the lines of cls=clear. I've tried putting it in ~/.cshrc and in ~/.profile. I've tried: alias cls ...
slaurel's user avatar
  • 31
0 votes
1 answer
6k views

How to create alias with variable in .cshrc?

For example, I want to create an alias to remove duplicate lines: alias rm.dup 'perl -ne 'print unless $dup{$_}++;'' When source .cshrc, it reports: "dup: Undefined variable." If change it to ...
Fisher's user avatar
  • 163
0 votes
1 answer
2k views

How to execute an alias, encapsulated in another source file?

For instance ~/.cshrc: alias job_start 'cd $PROJ_DIR && source .env/bin/activate.csh && rehash && job_run' $PROJ_DIR/.env/bin/activate.csh: alias job_run '(cd $PROJ_DIR/...
kAldown's user avatar
  • 277
2 votes
1 answer
2k views

Wrapping aliases in Bash

Converting an old .cshrc file into a .bash_aliases file. I've run into a few syntax issues regarding the conversion, but this involves a little more in depth knowledge of Bash. In [t]Csh, the shell ...
BotNet's user avatar
  • 123
0 votes
0 answers
2k views

Why alias could not be found in the shell

I was trying to set the alias for command: {cutadapt -O 24 -q 19,19 -m 30 -g TATAGAATTCGCGGCCGCTCGCGATAATACGACTCACTATAGGGCGTTTTTTTTTTTTTTTTTTTTTTTT -g ...
Jun's user avatar
  • 531
3 votes
1 answer
3k views

cshell alias: How to use nested single quotes(') in in cshell alias

I am trying below alias in cshell: alias sll 'ls -l \!* | grep -oE '[^ ]+$' | paste -s | xargs ls -l' For this CSH says, Illegal variable name. If I use \$, alias will be set without any error. But ...
BluVio's user avatar
  • 155
3 votes
1 answer
3k views

Odd alias "find . -name '*\!{*}*' -ls" in Unix Power Tools

From Unix Power Tools 3rd Edition page 175: Article 9.27 shows a way to match directories in the middle of a path. Here's a simpler "find file" alias that can come in very handy: alias ff &...
Wildcard's user avatar
  • 36.8k

15 30 50 per page