Sponsored Content
Top Forums Shell Programming and Scripting Code for running commands one after other Post 302455452 by sriki32 on Tuesday 21st of September 2010 03:43:37 PM
Old 09-21-2010
a) cd /root/user/dir/sd/disk
./runInstaller -silent -responseFile

b) cd /root1/user1
cp /root/user/dir/sd/disk/ram.txt
now b) executes before a) is successfully done.

so I want b) to start only after successfull completion of a)
 

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

code that reads commands from the standard i/p and executes the commands

Hello all, i've written a small piece of code that will read commands from standard input and executes the commands. Its working fine and is execting the commands well. Accepting arguments too. e.g #mkdir <name of the directory> The problem is that its not letting me change the directory i.e... (4 Replies)
Discussion started by: Phrozen Smoke
4 Replies

5. 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

6. Programming

Running shell commands from C/C++

Hi guys, I know using system() we can run unix commands but the problem is, I can't get any returns with the system(). I am returning stuff from my shell scripts that I need to be able to read from my C code. Anybody has cure to this problem? :)) Thanks (2 Replies)
Discussion started by: alirezan
2 Replies

7. 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

8. Shell Programming and Scripting

For loop and running 2 commands at once?

HI. I am trying to run 2 commands, using the "for x in a b c d" loop but i am having a hard time coding it... Here is what i have so far: for SERVER in SERVERA SERVERB SERVERC SERVERD SERVERE do ############################################################################### #... (5 Replies)
Discussion started by: Stephan
5 Replies

9. 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

10. 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
PCINITRD(8)						      System Manager's Manual						       PCINITRD(8)

NAME
pcinitrd - create a PCMCIA initrd ram disk image SYNOPSIS
pcinitrd [-v] [-a] [--all] [-d alternate-root] [--dir=alternate-root] [-r kernel-release] [--release=kernel-release] [-s image-size] [--size=image-size] [-u] [--update] initrd-image [modules ...] DESCRIPTION
The pcinitrd script creates an initrd ram disk image for booting with the root filesystem on a PCMCIA device. If the target is a block special device (i.e., /dev/fd0), then the initrd image is created on that device. If the target does not already exist or if it is an ordinary file, then pcinitrd will create the image file using the ``loopback'' device. Modules are specified with paths relative to /lib/modules/[kernel-release]. The core PCMCIA modules (pcmcia/pcmcia_core and pcmcia/ds) will automatically be installed in the target image. All other device-specific modules need to be listed on the command line, along with the appropriate socket driver (pcmcia/i82365.o or pcmcia/tcic.o). Alternatively, if -a is specified, then all available PCMCIA socket drivers and block device drivers will be included in the image. Additional files to be copied to the initrd image may also be listed on the command line. Executable programs will be installed in /bin, shared libraries will be installed in /lib, device files will be installed in /dev, and any other files will be placed in /etc. The startup script in the resulting image, linuxrc, may need to be customized for a particular system. It contains the same variable defi- nitions as the normal PCMCIA startup scripts (i.e., PCIC=, PCIC_OPTS=, and CORE_OPTS= variables). The /etc/config.opts file may also need to be edited. Any changes to linuxrc or config.opts will be preserved if pcinitrd is executed in ``update'' mode. Another feature of the generated linuxrc is that if the DEBUG variable is set to a non-blank string at the boot prompt, then cardmgr will echo all its status messages to the console, and after linuxrc executes, it will fire up a shell on the console. This can be helpful for debugging initrd problems. However, few commands are available in the normal initrd environment. OPTIONS
-v Verbose mode. Identify files as they are copied. -a, --all Install all socket drivers and block-style PCMCIA device drivers, including memory card, SCSI card, and fixed-disk drivers. This is mainly intended for use by package maintainers. -d alternate-root, --dir=alternate-root Specifies an alternate directory tree to search for all the files used to put together the initrd image. This may be helpful for running pcinitrd after booting from an installation or rescue diskette. -r kernel-release, --release=kernel-release Specifies the kernel release number (i.e., 2.0.28) to use when looking for modules in /lib/modules. The default is the release of the running kernel. -s image-size, --size=image-size Specifies the filesystem size to create on the target file or device, in 1k blocks. The default is 2400. -u, --update Update mode: updates cardmgr and all the kernel modules in an existing initrd image, but does not modify other files. AUTHOR
David Hinds - dahinds@users.sourceforge.net SEE ALSO
pcmcia(5), cardmgr(8), lilo(8). pcmcia-cs $Date PCINITRD(8)
All times are GMT -4. The time now is 07:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy