LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2004, 03:32 AM   #1
tdp05
LQ Newbie
 
Registered: Jul 2003
Distribution: RH7.3,RH9,SuSe9.1Pro
Posts: 7

Rep: Reputation: 0
bash equivalent to tcsh's \!*


I had used tcsh as my default shell with my last couple of installs because we use it work (used to be an SGI shop, so that's just a holdover now that we're a linux shop)

I'm trying to convert my ~/.alias file from tcsh aliases to bash aliases, and alot of my variations of 'ls' use \!*, like:

alias la='ls -ah \!*'
alias ll='ls -lh \!* '
alias lla='ls -lah \!* '
alias l='ls -loah \!*'
alias latr='ls -1atrh \!*'
alias lltr='ls -ltrh \!*'
alias lr='ls -1trh \!*'
alias lsd='ls -ldh \!*' # list directories on

these don't work because bash isn't interpreting them correctly. I know it's probably pretty simple, but I don't know how to describe what \!* does, (I know how it functions) to look for the concept on google/linux or on here.

Thanks.
 
Old 09-03-2004, 04:08 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
Try remove \!* and change your alias syntax so it looks like :

alias ll="ls -lh"

From man csh :
Aliases can be used to introduce parser
metasyntax. For example, `alias print 'pr \!* | lpr''
defines a ``command'' (`print') which pr(1)s its arguments
to the line printer.

So anyway you did not need \!* in csh for your aliases of ls
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash equivalent to C increment operator andrewb758 Linux - General 5 02-21-2009 12:25 PM
$LINENO can't be modified in bash 3.0, while it can be in bash 2.05b Darwish Linux - Software 1 11-07-2005 02:57 PM
bash + html + javascript or just bash ? rblampain Programming 4 12-01-2004 07:53 AM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 06:42 PM
equivalent to c? codename000 Programming 3 04-03-2003 11:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration