pwd problem
hi!!!,
I wan't to create backup files on my system with extension ~
eg: 1.c~ for 1.c
I decided to write a shell script for the same
I name it as vim.sh
and in by .bashrc i alias it as
alias "vim =sh ~/vim.sh"
#!/bin/sh
for i in $@
do
cp $i /pwd/$i~
vim $i
done
It does not work and the error it gave without the lineno:5(vim $i)
as cannot locate directory /pwd/
What is the variable in shell which contains the present working
directory..
I think getting variable should solve the problem ..
Any ideas ..
Thanks for reading...
|