I am trying to write a bash script that will create a .bashrc and .vimrc. I was wondering if anyone would know how to do approach this. Would this work if there was no .bashrc file minus the "stuff"
Last edited by meredith1990; 12-07-2011 at 11:09 PM..
I did try it and it did not work but I am not sure how else to approach it. I got rid of the echo part and that did not work as well. I am completely stuck.
im not trying to echo it to the command line. I am trying to create a script that will create a .vimrc and .bashrc but i can not figure out how to do this. i thought that
would work but it did not. if this whole thing does not make sense i can try and clerify.
Last edited by meredith1990; 12-08-2011 at 08:31 PM..
tries to execute the command stuff which will, if you're lucky, give you "command not found'. If you're unlucky the system will find a command named stuff and happily execute it with unknown results, saving its output into ~/.vimrc.
If you want to print the text, echo "stuff" will print the text stuff. That's why you need the echo.
If you want to print it to a different destination than your terminal, echo "stuff" > ~/.vimrc
If you want to feed multiple lines into ~/.vimrc, you can use a here-document:
Note the EOF must be at the beginning of the line or the here-document won't end properly.
Hi,
1. I'm using tcsh and I use a .gvimrc file which was working fine with my previous ksh shell. But while sourcing, I'm getting messages like 'Unmatched " '. I'm not trying anything fancy but just using " for commenting in the very first line and I see the error is thrown right there.
2.... (2 Replies)
I'm having trouble getting my vimrc to work the way I want it. For some reason after I hit enter it is creating tabs instead of spaces like I would expect. Here is an example of what I am talking about. $ = newline, ^I = tab. On the line of struct EDGETAG* q; I hit enter and it created a tab... (2 Replies)
Dear All,
We run backup script to update backup file every hour.
I want to create a script, which transfer these files in another server using ftp as new backup file created every hour. Files should be stored with a unique name for every hour(e.g 20130708_13:00 , 20130708_14:00 and so on) and... (13 Replies)
I was reading this and thought I could put this in my vimrc and it would convert the line endings to unix. Am I doing something wrong or am I missing something?
set ff=unixManaging/Munging Line-Endings with Vi/Vim | Jeet Sukumaran
I used this command and it confirms that my global option is... (2 Replies)
Hi
since we migrated from Solaris 8 to Solaris 10 I do miss a nice feature when editing crontab with vim editor: no more color highlighting after starting to edit. Well there is a hack, see below.
I did define:
export EDITOR='vim -c ":source /export/home/duc904/.vimrc"'
Under Sol8 when... (2 Replies)
i have made a few changes to my bashrc file...have set a few environmental variable that my shell scripts use. Is there any way that these changes can reflect in evryone else's bashrc who are in the network or do all of them have to copy those changes to their own bashrc file. (2 Replies)
Hi There, :)
I Need to put the following command in the vimrc for the execution of ECLIPSE
so I have written smthing like as follows,
export PATH=$PATH:/JVM location
after this i go to my eclipse folder and when I execute STILL it is not getting opened.....
Any Help that makes my... (6 Replies)
I need some help making this script... I guess I'm having trouble even interpretating what to even get started on...
I need to create a script that will search a given directory (typically a user's home directory, but not necessarily) as provided on the command line and any sub-directors for... (2 Replies)
:) as soon as i installed my software a couple of weeks ago..
(fedora core 2 vs, 2.6.8-1.521) i decided to switch the shell to sh shell and i know that .bashrc is the bash profile file(???) i want to use the sh version of the same file and make it the main profile file.. how can I switch it and... (3 Replies)