Sponsored Content
Top Forums Shell Programming and Scripting both sides execution of command Post 302521695 by munna_dude on Thursday 12th of May 2011 04:01:10 AM
Old 05-12-2011
both sides execution of command

Hi,

i am struggling with a chunk of code.

Code:
    for ((i=1; i<=3; i++));do
        one-$i ="/tmp/one.$RANDOM"
    done

How to execute the above code.
In both sides(LHS and RHS), i am executing commands.
it is not allowing to execute.

can you please give the idea.

It should be very appreciable, if i get an example.

Thanks.

Last edited by pludi; 05-12-2011 at 05:19 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

command execution ??

hi i have small shell script as follows cd /utilities/promoter/tmp grep SENDREPLY $1 | grep 'zzzzz@zzz.com' | awk -F" -f1 > /tmp/$LOGNAME/$1.request cd /tmp/$LOGNAME grep -e "\.sql" -e "\.md" $1.request > upd_$1.txt grep -v -e "\.sql" -e "\.md" $1.request > copy_$1.txt ... (1 Reply)
Discussion started by: zedex
1 Replies

2. UNIX for Advanced & Expert Users

command execution alert

hi Guys! My requirement is... I need to get notified if somebody executes a specific commands...like kill or httpd stop.... something like that.... can somebody help me out... Regards, kiran (8 Replies)
Discussion started by: dddkiran
8 Replies

3. Shell Programming and Scripting

Code for execution command by command

a) cd /root/user/dir/sd/disk ./runInstaller -silent -responseFile b) cd /root1/user1 cp /root/user/dir/sd/disk/ram.txt now a) executes and starts running but b) interupts a) and is executed while a) is running on the other hand so I want b) to start only after successfull completion of... (6 Replies)
Discussion started by: sriki32
6 Replies

4. Solaris

get the total execution of command

hi, i have to get the info between start to stop of a command execution suppose, if we execute the command like pkgadd then while its executing it ask some questions , i have to get total information untill pkgadd command complete into a perticular file. (3 Replies)
Discussion started by: shankr3
3 Replies

5. AIX

HMC updates managed system firmware on both T and P sides ?

Hi, I'm planning to update managed system firmware to new release using HMC. This is cite from IBM documentation describing HMC managed system updates: What I know we install new firmware to T side and in case some problems we boot P side and reject new fw on T. So if HMC updates both T and... (0 Replies)
Discussion started by: vilius
0 Replies

6. Shell Programming and Scripting

Want to terminate command execution when string found in the command output

Hi Experts, I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task. I am running below command to snmpwalk the router.. snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies

7. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

8. UNIX for Advanced & Expert Users

Parallel Execution of Command

Hi All, We have a table that has to store around 80-100 million records. The table is partitioned by a column called Market Code. There are 30 partitions each corresponding to one MRKT_CD. The source of this table is a join between 3-4 other tables. We are loading this table through SQLPLUS... (2 Replies)
Discussion started by: jerome_rajan
2 Replies

9. UNIX for Dummies Questions & Answers

Execution of command at command prompt

Hello Experts, I am still learning linux and have come across a question, hope to get some answer. I have two servers, and both have the same version of svn client installed and both have the same user_id. my SVN client version: svn, version 1.6.11 (r934486) compiled Mar 2 2011,... (4 Replies)
Discussion started by: babyPen1985
4 Replies
pack_fopen_chunk(3alleg4)					  Allegro manual					 pack_fopen_chunk(3alleg4)

NAME
pack_fopen_chunk - Opens a sub-chunk of a file. Allegro game programming library. SYNOPSIS
#include <allegro.h> PACKFILE *pack_fopen_chunk(PACKFILE *f, int pack); DESCRIPTION
Opens a sub-chunk of a file. Chunks are primarily intended for use by the datafile code, but they may also be useful for your own file rou- tines. A chunk provides a logical view of part of a file, which can be compressed as an individual entity and will automatically insert and check length counts to prevent reading past the end of the chunk. The PACKFILE parameter is a previously opened file, and `pack' is a bool- ean parameter which will turn compression on for the sub-chunk if it is non-zero. Example: PACKFILE *output = pack_fopen("out.raw", "w!"); ... /* Create a sub-chunk with compression. */ output = pack_fopen_chunk(output, 1); if (!output) abort_on_error("Error saving data!"); /* Write some data to the sub-chunk. */ ... /* Close the sub-chunk, recovering parent file. */ output = pack_fclose_chunk(output); The data written to the chunk will be prefixed with two length counts (32-bit, a.k.a. big-endian). For uncompressed chunks these will both be set to the size of the data in the chunk. For compressed chunks (created by setting the `pack' flag), the first length will be the raw size of the chunk, and the second will be the negative size of the uncompressed data. To read the chunk, use the following code: PACKFILE *input = pack_fopen("out.raw", "rp"); ... input = pack_fopen_chunk(input, 1); /* Read data from the sub-chunk and close it. */ ... input = pack_fclose_chunk(input); This sequence will read the length counts created when the chunk was written, and automatically decompress the contents of the chunk if it was compressed. The length will also be used to prevent reading past the end of the chunk (Allegro will return EOF if you attempt this), and to automatically skip past any unread chunk data when you call pack_fclose_chunk(). Chunks can be nested inside each other by making repeated calls to pack_fopen_chunk(). When writing a file, the compression status is inherited from the parent file, so you only need to set the pack flag if the parent is not compressed but you want to pack the chunk data. If the parent file is already open in packed mode, setting the pack flag will result in data being compressed twice: once as it is written to the chunk, and again as the chunk passes it on to the parent file. RETURN VALUE
Returns a pointer to the sub-chunked PACKFILE, or NULL if there was some error (eg. you are using a custom PACKFILE vtable). SEE ALSO
pack_fclose_chunk(3alleg4), pack_fopen(3alleg4) Allegro version 4.4.2 pack_fopen_chunk(3alleg4)
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy