LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-07-2014, 07:24 PM   #1
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Rep: Reputation: 5
.bashrc question


I am trying to make an alias that will put out this string at the command prompt and then wait for my further input, rather than automatically execute itself.

cat /dev/null > <cursor would stop here>

Thanks.
 
Old 05-07-2014, 08:44 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,962

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Sounds like a good way to shoot yourself in the foot, but how about:
Code:
alias mung='read -p "cat /dev/null > "; cat /dev/null >"$REPLY"'
Note that it can misbehave rather dangerously if invoked with an argument. I suggest rigorous testing with a command a lot more harmless than "cat ... >".
 
Old 05-08-2014, 06:19 AM   #3
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Original Poster
Rep: Reputation: 5
Thanks.
 
  


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
question about functions in .bashrc Jspradling84 Linux - Newbie 3 04-04-2014 06:05 AM
question about bash, bashrc computergirl121 Linux - Newbie 12 05-06-2013 08:38 AM
basic .bashrc question TheGNUbie Linux - Newbie 1 03-08-2007 12:05 PM
.bashrc question aizkorri Programming 6 08-14-2002 07:41 AM
Question on .bashrc Fluke Linux - Newbie 2 06-29-2002 02:40 PM


All times are GMT -5. The time now is 10:43 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration