04-25-2005
Command prompt from within a script?
I am writing a menu script and one of the options is to access a Command Prompt and return to the menu via CTRL-D. I have tried using a loop and echoing the PS1 value, then using read to assign whatever is entered into a variable, then executing the value of that variable as a command using
. $variable. it would look something like this and would work just fine except for one thing.....I have no idea how to put CTRL-D into the script. If i hit the CTRL button from within the vi editor it has its own special function. I've tried ^D, and whatever else i could think of but to no avail.
clear
do until [ $variable = CTRL-D ]
echo "`PS1`:"
read variable
. $variable
esac
thank you in advance
10 More Discussions You Might Find Interesting
1. SuSE
Sir,
I using the following commands in a file (part of a bigger script):
#!/bin/bash
cd /opt/oracle/bin
ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out
If I run this from the command prompt the result is:
2007-05-16
if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies
2. Shell Programming and Scripting
I hope someone can shed any light on this mystery.
I am trying to run the following command:
su userID -c
remsh server -l userid -n "awk -F^ '\$4 == \"SMITH\"' /tmp/infromational/version74b/LIVE/TEMPORARY/ABCfiles/HLC_Database_File.bat|head -1" > /tmp/variant/45BV32/var/store13.logfnd
I... (15 Replies)
Discussion started by: Korn0474
15 Replies
3. UNIX for Dummies Questions & Answers
hi
i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script
example:
file name is test.vbs which contains
strSoundFile = "C:\windows\Media\Notify.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies
4. Shell Programming and Scripting
Gurus,
I have written a shell script to backup a database and applications. This is how the script works:
1. As applications user (say applmgr), the main backup script, say backup.sh, is kicked off.
2. backup.sh does ssh to oracle user and kicks off the database backup using nohup and... (1 Reply)
Discussion started by: sunpraveen
1 Replies
5. AIX
$cat /tmp/tuxob.lst
udi *****
jim 10
ant 19
ibm *****
$ input=`head -1 /tmp/tuxob.lst | awk '{print $NF}'`
$ echo $input
The output I am expecting is '*****'. But It is showing me the available files of current directory. When I run the command
head -1 /tmp/tuxob.lst | awk '{print $NF} ... (3 Replies)
Discussion started by: panchpan
3 Replies
6. Shell Programming and Scripting
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies
7. Shell Programming and Scripting
Hello forum memebers,
I have to write a script to copy command arguments into a log.please see the below issue and help me to complete it.
i have command "mkidcfg" it is custiomized.I will run the command with one arguments .
mkidcfg -I _config.db_ids it will open the below options.
1... (2 Replies)
Discussion started by: rajkumar_g
2 Replies
8. Shell Programming and Scripting
Hello,
I work on Windows and I use Putty to access a remote UNIX server.
I am trying to build a shell script that will have as main task to open the
Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file... (14 Replies)
Discussion started by: rookie2785
14 Replies
9. Windows & DOS: Issues & Discussions
This is a script in visual basic that basically sends an email from an existing account, in this case the example is provided for live.com. It uses CDO (Collaboration Data Objects).
All you need to do is replace the fields with the proper information.
The email is send from Command Prompt... (0 Replies)
Discussion started by: Tribe
0 Replies
10. UNIX for Dummies Questions & Answers
Hi everyone
I have a problem with my script
If I try directly this command
/usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz
It works
But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
EVIM(1) General Commands Manual EVIM(1)
NAME
evim - easy Vim, edit a file with Vim and setup for modeless editing
SYNOPSIS
evim [options] [file ..]
eview
DESCRIPTION
eVim starts Vim and sets options to make it behave like a modeless editor. This is still Vim but used as a point-and-click editor. This
feels a lot like using Notepad on MS-Windows. eVim will always run in the GUI, to enable the use of menus and toolbar.
Only to be used for people who really can't work with Vim in the normal way. Editing will be much less efficient.
eview is the same, but starts in read-only mode. It works just like evim -R.
See vim(1) for details about Vim, options, etc.
The 'insertmode' option is set to be able to type text directly.
Mappings are setup to make Copy and Paste work with the MS-Windows keys. CTRL-X cuts text, CTRL-C copies text and CTRL-V pastes text. Use
CTRL-Q to obtain the original meaning of CTRL-V.
OPTIONS
See vim(1).
FILES
/usr/share/vim/vim72/evim.vim
The script loaded to initialize eVim.
AKA
Also Known As "Vim for gumbies". When using evim you are expected to take a handkerchief, make a knot in each corner and wear it on your
head.
SEE ALSO
vim(1)
AUTHOR
Most of Vim was made by Bram Moolenaar, with a lot of help from others. See the Help/Credits menu.
2002 February 16 EVIM(1)