Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Running two commands in one line Post 302148166 by rdns on Friday 30th of November 2007 04:54:35 AM
Old 11-30-2007
Running two commands in one line

hi!

how do i run 2 command from the same line
e.g: 'which screen' and then ls -la 'which screen'
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

running start up commands

Hi all How can I setup my shell so that I run a set of commmands or a script every time I login. I am using kshell. I tried putting a line in ./.bash_profile (does not work) Ex.: I want to use vi as the commandline editor so, I want to run the command: set -o vi (3 Replies)
Discussion started by: skotapal
3 Replies

2. Shell Programming and Scripting

running commands from script

I'm new to unix and I have a fairly simple problem: Lets say I am in a specific directory and I run the command: "dirs" , I get an output of all the folders that i pushed into the stack (as expected), buut, when when I create a script (called test): #! /bin/csh dirs and then i run:... (2 Replies)
Discussion started by: owijust
2 Replies

3. Shell Programming and Scripting

How to disable running commands from vi

Hello, We have a requirement to disable running shell commands via vi using "!". Can anybody please suggest how to disable this option. The requirement arises because we open up a xterm window with a config file in vi mode for the customer to edit. After the customer edits the config... (1 Reply)
Discussion started by: Umesh_Sharoff
1 Replies

4. Programming

Running UNIX Commands from C

Hi, -How can I get number of files, cpu usage (percentage), memory usage, disk usage, ...etc, using C program ... I can use unix command ( system(command) )but I want the value to be returned back to my C program to use it in my code? How can I do that? Thanks in advance ... (2 Replies)
Discussion started by: zainab
2 Replies

5. Shell Programming and Scripting

Running sed commands

Hello I need to run some sed commands but it involves "/" in the substitute or delete, any ideas how I get round the problem. Example: cat file1.txt | sed -e '/</Header>/d' > file2.txt This errors due to the forward slash before the Header text. Thanks (3 Replies)
Discussion started by: Dolph
3 Replies

6. UNIX and Linux Applications

Running oracle commands Directly from Command Line

In mysql, I can get what I want from a database without having to log into mysql. works great for me and it is perfect. now, i want to be able to do the same in oracle but I dont know how to. For example, if i want to retrieve information from the mysql database from the command line, i issue... (4 Replies)
Discussion started by: SkySmart
4 Replies

7. Shell Programming and Scripting

Code for running commands one after other

I need an if code in shell script where it should continue to further commands after succesfully installing the executable file. i.e. /run installer is continuing but in the middle it executes further commands like "cp /root/user which were given after /run installer. I want /runinstaller... (16 Replies)
Discussion started by: sriki32
16 Replies

8. UNIX for Dummies Questions & Answers

Echo out running commands

Is there any way in a script to print out the commands being ran? In DOS script, there is the "@echo on" and "@echo off". so I have a script like this: #!/bin/ksh echo "hello there. moving files." <turn on echoing here> cp thisfile.txt thatfile.txt cp whatfile.prop whyfile.prop <turn... (2 Replies)
Discussion started by: ronron5477
2 Replies

9. Shell Programming and Scripting

Running commands in backgroud

I have a small question may be this will be discussed before I have two files file1 and file2 with huge data and I am running the commands as cat file1 |sort & cat file2 |sort & If the session is got disconnected or logout will this command run in background, or shall we use nohup (3 Replies)
Discussion started by: morbid_angel
3 Replies

10. Shell Programming and Scripting

Running two commands in background

Hi I want to run two commands in background, i am using below way, but it is not working, i m calling these two commands from one script to another server where below commands are running, in my script ssh is working fine, but command is not going in background, please advise what should i do. ... (10 Replies)
Discussion started by: learnbash
10 Replies
MDM.SCREEN(1)							   User Commands						     MDM.SCREEN(1)

NAME
mdm.screen - run a command under mdm-master SYNOPSIS
mdm.screen [-c iospec] [-n slaves] command DESCRIPTION
mdm.screen runs command under mdm-master so that mdm-run commands in command can run in parallel. This program is a part of the Middleman System (mdm). OPTIONS
The mdm.screen command has two optional options. -c iospec The iospec file (see below). -n slaves The number of mdm-slave process to start (default 6). THE IOSPEC FILE
mdm-master uses the iospec file to decide whether two commands interfere with each other, and it only runs two commands at the same time if they do not interfere. Each line of the iospec file specifies the I/O behavior of a program, unless the line starts with a '#' character, in which case the line is treated as comments and ignored. The format is as follows: program spec spec ... program names the program whose behavior you are specifying. For each spec element, the first character indicates usage, and the remaining characters indicate resource. A resource that starts with a '-' character represents the argument of the corresponding program option. A resource that is an empty string represents a program argument. A resource that is not empty and does not start with a '-' character represents the resource string itself. A usage is typically an upper-case character. If two commands access the same resource with different usage, mdm-master will not run these two commands at the same time. Furthermore, if a command access a resource with 'W' usage, mdm-master will not run it with any command that access the same resource in any way (including 'W'). There is a special case: if usage is '0' and resource starts with a '-' charac- ter, it means that the resource program option does not take any arguments. All programs has an implicit spec 'Rglobal', so if you mark a program as 'Wglobal', it will not run while any other command is running. Here is an example to help clarify matters. Suppose we have the following iospec file: cc W-o 0-c R rm W Then these two commands can run at the same time: cc -o pa pa.o lib.o cc -o pb pb.o lib.o These two commands cannot run at the same time: cc -o pa.o -c pa.c cc -o pa pa.o lib.o And these two commands also cannot run at the same time: cc -o pa pa.o lib.o rm pa EXIT STATUS
The exit status of mdm.screen is 0. EXAMPLE
Here is what you do to decompress all files with .gz extension in the current directory tree. mdm.screen find . -iname '*.gz' -exec mdm-run gunzip {} ; Since we run find under mdm.screen and invoking gunzip under mdm-run, we specify that we wish to run the gunzip commands in parallel. SEE ALSO
mdm-run(1), mdm-sync(1), ncpus(1) Linux 2009-03-06 MDM.SCREEN(1)
All times are GMT -4. The time now is 06:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy