Sponsored Content
Top Forums Shell Programming and Scripting Partition script output question Post 302656983 by birdboyee on Friday 15th of June 2012 06:55:42 PM
Old 06-15-2012
Question Partition script output question

Hello Everyone! I have a file called “cells” with 3 set of #'s, roughly 400+ lines. My current tool "movrcs" grabs the “cells” file, and creates one huge “mov_rcs” script which is a problem. I want the tool to grab 20 lines of the "cells" file at a time, and create separate script files for them, not one huge output script. Any assistance is greatly appreciated!!!! Smilie

omp root> cat cells
Code:
  62 33 34 
  103 44 43 
  104 44 43 
  105 44 43 
  106 44 43 
  107 44 43 
  108 44 43 
  109 44 43 
  110 44 43 
  112 44 43

…Output truncated, there are over 250+ lines

omp root> cat movrcs
Code:
while read cell prim alt
  do
   
  echo "/omp/bin/TICLI -1 move:rcs $cell,altap $alt" >> mov_rcs
  echo "sleep 20" >> mov_rcs
  echo "/omp/bin/TICLI -1 move:rcs $cell,priap $prim" >> mov_rcs
  echo "sleep 40" >> mov_rcs
   
  done < cells

ompeps root> cat mov_rcs
Code:
/omp/bin/TICLI -1 "move:rcs 62,altap" 34
  sleep 60
  /omp/bin/TICLI -1 "move:rcs 62,priap" 33
  sleep 60
  /omp/bin/TICLI -1 "move:rcs 103,altap" 43
  sleep 60
  /omp/bin/TICLI -1 "move:rcs 103,priap" 44
  sleep 60
  /omp/bin/TICLI -1 "move:rcs 104,altap" 43
  sleep 60
  /omp/bin/TICLI -1 "move:rcs 104,priap" 44
  sleep 60
  …..output truncated


Last edited by methyl; 06-15-2012 at 08:29 PM.. Reason: please use code tags; sort out broken html
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Question About Drive Partition

I'm using PartitionMagic's wizard to partition my drive for Linux, and after I get past the first step it asks if I want to screate a seperate Linux Swap Partition. What is a Linux Swap Partition and is something I need/should have? (10 Replies)
Discussion started by: Tradewynd
10 Replies

2. UNIX for Dummies Questions & Answers

understanding logical partition, physical partition

hi, 1) is logical partition the same as physical partition except that one is physical and the other is logical? 2) then it must a one to one ratio? (3 Replies)
Discussion started by: yls177
3 Replies

3. UNIX for Dummies Questions & Answers

I've created a partition with GNU Parted, how do I mount the partition?

I've created a partition with GNU Parted, how do I mount the partition? The manual information at http://www.gnu.org/software/parted/manual/parted.html is good, but I am sure about how I mount the partition afterwards. Thanks, --Todd (1 Reply)
Discussion started by: jtp51
1 Replies

4. Shell Programming and Scripting

view partition name using script

Hi All.. Previously i've posted my question regarding this script and i managed to solve the problem but i need to modified my script so it will meet the new requirement. Below is the script and output: -------------------------------------------------------------- -bash-3.00$ more... (5 Replies)
Discussion started by: adzuanamir
5 Replies

5. UNIX for Advanced & Expert Users

partition question

Hi I have an exam question which is below and I am looking for answer of this question: I would appreciate your help. * You are the systems administrator of a mail server that services approximately 3,000 users. 2,000 users access their email via a POP-3 service, while the remaining 1,000... (0 Replies)
Discussion started by: tjay83
0 Replies

6. Shell Programming and Scripting

Use script to monitor command output question? (like Linux watch)

Hi I want to write a script, help me to monitor command output. This script like Linux "watch" command. Below is my script: # cat watch.sh #!/bin/bash while true do clear echo "command: $*" ( $* ) sleep 2 done Then I run this script below (2 Replies)
Discussion started by: nnnnnnine
2 Replies

7. Shell Programming and Scripting

Shell script output redirection question

OS : AIX 6.1 Shell : Korn in the url https://forums.oracle.com/forums/thread.jspa?threadID=361463&tstart=0 I came across a crontab entry example 00 23 * * 1,3,5 <complete shell script path> 1> <log file> 2>&1 From googling , I gathered that 0 - stdin 1 - stdout 2 - stderr I... (5 Replies)
Discussion started by: polavan
5 Replies

8. Solaris

Partition overlaps another partition while creating new parition in solaris

hi all while formatting hard disk i am getting following error. Partition 1 ends at 266338338 It must be between 34 and 143374704. label error: EFI Labels do not support overlapping partitions Partition 8 overlaps partition 1. Warning: error writing EFI. Label failed. I have formatted the... (2 Replies)
Discussion started by: nikhil kasar
2 Replies

9. Filesystems, Disks and Memory

Ask concept soft partition vs hard partition

Hi Experts I would like to know different between soft partition concept and hard partition concept on solaris. Here is little explanation between soft partition concept and hard partition concept on solaris. Soft Partition: 1TB total space available in storage in all mapped to the OS to... (2 Replies)
Discussion started by: edydsuranta
2 Replies

10. Red Hat

Shrink LVM partition & create new Linux Primary partition

Hello All, I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows, /boot - Linux Partition & another is LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc). Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Discussion started by: gr8_usk
5 Replies
GZEXE(1)						      General Commands Manual							  GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe name ... DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a penalty in performance). For example if you execute ``gzexe /usr/bin/gdb'' it will create the following two files: -rwxr-xr-x 1 root root 1026675 Jun 7 13:53 /usr/bin/gdb -rwxr-xr-x 1 root root 2304524 May 30 13:02 /usr/bin/gdb~ /usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing executable file. You can remove /usr/bin/gdb~ once you are sure that /usr/bin/gdb works properly. This utility is most useful on systems with very small disks. OPTIONS
-d Decompress the given executables instead of compressing them. SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1) CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the PATH environment variable to find gzip and some standard utilities (basename, chmod, ln, mkdir, mktemp, rm, sleep, and tail). BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases, using chmod or chown. GZEXE(1)
All times are GMT -4. The time now is 05:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy