Sponsored Content
Top Forums Shell Programming and Scripting How to execute a bash file in terminal? Post 302139387 by Hyunkel on Friday 5th of October 2007 10:14:31 PM
Old 10-05-2007
How to execute a bash file in terminal?

How do I execute a bash file in the terminal, after I created one?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute command from terminal on remote machine

Hi All, I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options. Requirement: Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
Discussion started by: Ranu
0 Replies

2. UNIX for Dummies Questions & Answers

How to search a file in bash terminal?

Hi all, I am new to unix. Anyone knows how to search a file in bash terminal, please kindly tell me. For example, I want to search file named "myfile" in the entire machine... Thanks a lot:) (2 Replies)
Discussion started by: andrewust
2 Replies

3. Shell Programming and Scripting

How to execute a bash script

Hi All, I am trying to write a simple bash script. rm -f File1 I saved this as test.sh Now when I want to execute it, I type ./test.sh It gives me error "command not found" What I am doing incorrect here? Do I have to add anything in script like #!/bin/bash (5 Replies)
Discussion started by: palak08
5 Replies

4. Shell Programming and Scripting

Run bash script without terminal

How can I make a bash script that keeps on running after I have closed the terminal? Or a script that runs without having the terminal window open? (1 Reply)
Discussion started by: locoroco
1 Replies

5. UNIX for Dummies Questions & Answers

Opening a terminal with bash

Hi, The computer that I use is on a network and has the exact same installation as other computers on the network (Ubuntu 10.04 LTS). When I open a new terminal window by default it opens a tcsh shell. I don't have the root privilege to modify it. Is it possible to open a terminal window that... (8 Replies)
Discussion started by: gaurab
8 Replies

6. Shell Programming and Scripting

Bash - hide a terminal cursor

Is it possible to make Linux terminal cursor invisible in bash script? (1 Reply)
Discussion started by: xqwzts
1 Replies

7. Shell Programming and Scripting

How to save and execute terminal commands in shell?

I frequently use some commands, which I want to save in some file say myregularshell.shthese are the commands I use, I tried saving and executing, but couldn't get the preview of execution, and result is also not coming if I copy same commands and paste it on terminal result is coming cd go... (2 Replies)
Discussion started by: Akshay Hegde
2 Replies

8. Shell Programming and Scripting

Modifying bash script to take each line in a file and execute command

I need to modify a bash script to to take each line in a file and execute command. I currently have this: #!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'`... (3 Replies)
Discussion started by: galford
3 Replies

9. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

10. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
OPENVT(1)							     Linux 1.x								 OPENVT(1)

NAME
openvt - start a program on a new virtual terminal (VT). SYNOPSIS
openvt [-c vtnumber] [-s] [-u] [-l] [-v] [--] command command_options DESCRIPTION
openvt will find the first available VT, and run on it the given command with the given command options, standard input, output and error are directed to that terminal. The current search path ($PATH) is used to find the requested command. If no command is specified then the environment variable $SHELL is used. OPTIONS -c vtnumber Use the given VT number and not the first available. Note you must have write access to the supplied VT for this to work. -e Directly execute the given command, without forking. This option is meant for use in /etc/inittab. -s Switch to the new VT when starting the command. The VT of the new command will be made the new current VT. -u Figure out the owner of the current VT, and run login as that user. Suitable to be called by init. Shouldn't be used with -c or -l. -l Make the command a login shell. A - is prepended to the name of the command to be executed. -v Be a bit more verbose. -w wait for command to complete. If -w and -s are used together then openvt will switch back to the controlling terminal when the com- mand completes. -- end of options to openvt. NOTE
If openvt is compiled with a POSIX (GNU) getopt() and you wish to set options to the command to be run, then you must supply the end of options -- flag before the command. EXAMPLES
openvt can be used to start a shell on the next free VT, by using the command: openvt bash To start the shell as a login shell, use: openvt -l bash To get a long listing you must supply the -- separator: openvt -- ls -l HISTORY
Earlier, openvt was called open. It was written by Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk>. The -w idea is from "sam". SEE ALSO
chvt(1), doshell(8), login(1) 19 Jul 1996 V1.4 OPENVT(1)
All times are GMT -4. The time now is 05:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy