Sponsored Content
Top Forums Shell Programming and Scripting Need Mac .sh to run command line app in seperate terminal Post 302475620 by yoyoyo777 on Monday 29th of November 2010 09:42:03 AM
Old 11-29-2010
Need Mac .sh to run command line app in seperate terminal

Hello, currently we are executing a .sh from terminal.

The current .sh looks like this:

#!/usr/bin/env bash

/Users/user/my.app/Contents/MacOS/my &

--

Now, we also need to run a third line in the .sh - It's a command line application that I need to run when I execute the above .sh however the new line that runs this command line application, I need to make sure runs in a separate terminal window then the above application AND it will need a 5 second head start on the current applications inside of the above .sh

What would my new .sh file look like?

Thanks.

Last edited by yoyoyo777; 11-29-2010 at 10:46 AM.. Reason: Added more information
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Display running 'app' in terminal titlebar?

Hi. I was, not too long ago, an OS X home user. One of the things I remember from using the Apple-installed Terminal is: whenever an executable that took more than a split second to do its thing was running, its name would appear in the title bar in a way similar to "Terminal: ssh" or "Terminal:... (0 Replies)
Discussion started by: SilversleevesX
0 Replies

2. Shell Programming and Scripting

#!/bin/bash and #1bin/sh command not found error on mac osx terminal/shell script

i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine. then last week i wrote capture.sh and it... (2 Replies)
Discussion started by: danpaluska
2 Replies

3. OS X (Apple)

Terminal.app keeps creating copies of my settings files

Under Leopard, I like to conveniently open Terminal windows onto remote systems. I've created several settings files in Terminal, one for each remote system that I want to access. To open window, I right-click on the Terminal icon in the Dock, expand the "New Window" menu item, and select the... (0 Replies)
Discussion started by: siemsen
0 Replies

4. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

5. UNIX Desktop Questions & Answers

How do you reverse terminal command line to the top?

Hi All, I work on a Linux platform which runs Red Hat (forget which version) and use both korn and bash shells. Is there a way of making the command line appear at the top of the terminal window and any lists, commands or directory names etc to appear below the top, that is to say reverse the... (1 Reply)
Discussion started by: ray_m
1 Replies

6. OS X (Apple)

How to start a new terminal from command line?

Dear All, Anyone knows how to start a new bash terminal from command line? Another question: when I use "open" command (open test.pdf) to open a pdf file, the PDF reader will start up, but cannot associate with that file. Anyone knows why? (1 Reply)
Discussion started by: andrewust
1 Replies

7. UNIX for Dummies Questions & Answers

Script to run a command in a new terminal

Hey, I am trying to write a script that will open all of my session windows, and then secure shell into the appropriate server in the new windows. Seems simple, but I cant get it to work! Please help! :confused: (1 Reply)
Discussion started by: sojo1024
1 Replies

8. Ubuntu

run multiple command at the same time in one window terminal using multiplexer

Hi, I would like to ask if someone knows or accomplished this task in the terminal multiplexer in a single window with multiple splitted pane: In the script run multiple command at the same time in diff splitted pane or simulatneously. As an example: I would like to run iptraf, iotop, htop,... (2 Replies)
Discussion started by: jao_madn
2 Replies

9. BSD

How to play a song in terminal app in os x?

Just wondering -- is there a way to play a song in iTunes from the terminal app? (1 Reply)
Discussion started by: Straitsfan
1 Replies

10. OS X (Apple)

A new OSX 10.12.x terminal from the command line.

Hi guys and gals... After much searching on the good ol' internet I could find nothing, so this is the result. ALthough many people seem to have asked this question no-one seems to have a solution so here we go. I need for AudioScope.sh, 'xterm' to run a second program for some of its... (2 Replies)
Discussion started by: wisecracker
2 Replies
dxdw(8) 						      System Manager's Manual							   dxdw(8)

NAME
dxdw - Runs and repeats command line commands SYNOPSIS
/usr/bin/X11/dxdw [-c initial_command] OPTIONS
Specifies the command to run. The command string must be enclosed in double quotes if it contains any spaces or special characters inter- preted by the shell. Display Window accepts all of the standard X Toolkit command line options, which are documented in the OPTIONS section of the X(1X) refer- ence page. DESCRIPTION
The Display Window application, dxdw, can be used to run commands at specified time intervals. You can use Display Window to: Run a command and display a transcript of the output Repeat a command at regular intervals Print the output to the default printer Save the output to a file You can use Display Window to run common commands without starting up a full xterm. The optional -c option specifies an initial command. The Display Window application presents a transcript containing the current command, its output, and its command-line error messages. You can change the command after the application starts. The transcript area is output-only, so you cannot use Display Window to run commands that require user interaction on the command line. The Display Window application can be invoked from the CDE Application Manager from the following categories: Application Group: System_Admin System Admin Subgroup: Daily Admin When the Display Window main window invoked, the transcript is empty because there is no command running. Enter a command to run in the Command input text field. Because Display Window can be started with a default initial command, several launchpoints have been created in the Application Manager to run specific command-line applications. These applications include I/O Statistics (iostat), Network Statistics (netstat), Virtual Memory Statistics (vmstat), and Who? (who). To start one of the preceding applications within Display Window from the CDE desktop: Click on the Application Manager icon on the CDE front panel. Double click on the System_Admin application group icon. Double click on the Tools application group icon. Double click on the icon for the command you want to run in the Display Window application. The Display Window application invokes the command once. The output from the command is displayed in the transcript area. You can also start Display Window from the command line. To start Display Window from the command line, enter the following: /usr/bin/X11/dxdw [-c initial_command] The -c option specifies the command string to run when Display Window is started. On the command line, the command string must be enclosed in double quotes if it contains any spaces or special characters interpreted by the shell. The command string can be any of the following: A single command A series of commands in a pipeline (|) A series of commands separated by semicolons After Display Window starts, a new command string can be entered in the Command input text field. In the graphical user interface, it is not necessary to enclose the command string in double quotes. To enter a new command string: Clear the Command input text field if a command is already present. Enter a new command string in the Com- mand input text field. Press the Return key in the Command input text field to run the command. EXAMPLES
The following example runs the iostat command one time in the Display Window application. You can use the Repeat Every dialog box to repeat the command at regular intervals. dxdw -c iostat The following examples show how to use Display Window from the command line. dxdw -c df dxdw -c "ps -aef" dxdw -c "ps -aef | grep dxdw" dxdw -c "mount; showmount" You can view the Display Window online help volume without run- ning the application. To open the Display Window help volume from the command line, enter the following command: /usr/dt/bin/dthelpview -h /usr/dt/appconfig/help/C/Dxdw.sdl FILES
Contains the Display Window application executable Contains the Display Window help volume Contains the default values for the applica- tion's X resources SEE ALSO
Commands: iostat(1), netstat(1), vmstat(1), who(1), X(1X) dxdw(8)
All times are GMT -4. The time now is 04:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy