Sorry for not mention clearly. I say it is example which i wrote here.
I need shell script to extract 3,5,7 which are in every 4th row for the below example.
==============
I am using Linux bash shell.. I don't know array concept in shell scripting i just know basics of shell programming.
I tried using
and
but it doesn't get the exact location.
---------- Post updated at 02:36 PM ---------- Previous update was at 02:06 PM ----------
Quote:
Originally Posted by Don Cragun
Is this a homework assignment?
I'm completely confused about what you are trying to do. You have shown us a file that contains 12 or 13 lines (I had to guess when I added CODE tags for you whether or not the line containing the equal signs is part of your input file). Then you say that you want every 50th row (of which there are none). And then you say you want 3, 5, and 7 (none of which appear in your input file). And you say you want those values stored in an array. What kind of array (shell, awk, ???)?
What OS are you using?
What shell are you using?
What language are you using?
What have you tried?
Sorry for not mention clearly. I say it is example which i wrote here.
I need shell script to extract 3,5,7 which are in every 4th row for the below example.
==============
I am using Linux bash shell.. I don't know array concept in shell scripting i just know basics of shell programming.
I tried using
and
but it doesn't get the exact location and also i wanted to store it in array after extracting it.
Last edited by JITHENDER; 07-17-2014 at 05:16 AM..
Reason: added code tags
I have the following output. I want to write a script to check for
1. waits > 0 on all rowsand Ratio > .0. if true then send email.
=========================
ROLLBACK SEGMENT CONTENTION
=========================
If any ratio is > .01 then more rollback segments are needed
NAME ... (1 Reply)
Hello ALL,
I am fresher in Unix . i need help to write small shell script . Please help me unix guru.
I am developing the internal site in my office . the data files are generated in one directory everyday .
I have to write shell script to sort those files and put it is internal site .
... (3 Replies)
Hi,
I am a new for shell script. i need to write script using the following commands
cd /usres/test
# create directory
mkdir temp+DATE( i need to append date )
#moving files from one directory to this directory(we need to check total files in source and taget)
cd /users/sample
... (2 Replies)
can anybody help me out in writing the any script (awk,shell or perl script) for incrementing the specific field highlighted below
/{/data/{/assetMetricsList//{1]/dailyCount,........./{/data/{/assetMetricsList//{100]/dailyCount
It should be in below format in oneline seperated by commas
... (1 Reply)
Can anyone please help me in writing a shell script that would check if a particular user(xyz) has logged in, and if yes, the audit daemon needs to be started. When the user logs off the dameon needs to shutdown , and the report needs to be e-mailed to a set of users. (12 Replies)
I am attempting to write a housecleaning script that does the following:
1) goes to a specific directory
2) deletes all contents of that directory but a specific directory within it.
So my users all keep and use the Shared directory in OSX. Within /Users/Shared there are also standard named... (1 Reply)
Hi,
I have two text files. Need to create a third text file extracting specific data from first two existing files..
Text File 1: Format contains:
SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010
some text ............so on...and somwhere text like:
Record 1:... (1 Reply)
Hi, I'm very new to this, so bear with me please.
I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then... (2 Replies)
Hi, I'm very new to this, so bear with me please.
I want to write a sh script (or if there's a better format please let me know) that allows me to, when I run it, print the date to a file (1.out) take 2 arguments (files a.fa and b.fa), run them with another program, outputting to 2.out, and then... (4 Replies)