So now, the variable "TAPELIST" contains those numbers, delimited by commas. I'd like to now have 2 other variables. The first containing the first 5 entries (701940L3,701941L3,701942L3,701943L3,701944L3) and the second containing the next 5...
I would guess it would be something like NEWLIST=$TAPELIST with some awks or something of the sort? and OTHERLIST=$TAPELIST next 5 entries...
Thanks Scrutinizer. Seems to work, but grabs the first five (LIST2) and LIST1 then lists the rest of the tapes? not necessarily the next five...Appreciate the post. Thanks.
I got this to work pretty good though. Increased it to 7 "tapes" though to be a bit safer in my queries...
---------- Post updated at 01:17 PM ---------- Previous update was at 01:13 PM ----------
Quote:
Originally Posted by anbu23
Thanks for the response. Yours seems to grab the first five but the the last five and not the next five...This could work though this way (at least as to what i am trying to do...). How could the "SecondFive" be modified to grab the "next" five though?
Thanks.
---------- Post updated at 01:19 PM ---------- Previous update was at 01:17 PM ----------
Quote:
Originally Posted by dr.house
This obviously works just as expected and it is what i was trying to figure out...But i need the LIST_1 to return the comma in between the tape list...Kinda like "701940L3,701941L3,701942L3,701943L3,701944L3". No commas at the beginning of the list and none at the end...
Dear Gurus
I am stuck with the peice of work and do not know from where to start.
I get a machine generated file which is binary file contain binary data, i want to read binary data as it is without converting into any other format.
i want to read byte by byte.
Please let me know what... (24 Replies)
Hi ,
i have a parameter which has path of a file. Now i need to have another parameter with the content of that file. I tried the belwo script , can any one please help.
I dont want to use cat command to read. Can we do it with out using cat command.
while read line
do... (9 Replies)
I have a file details.csv and I need to create 5 files in same folder named as details1.csv,details2.csv,details3.csv,details4.csv,details5.csv along with contents of details.csv
Thanks in Advance. (9 Replies)
Hi Guys,
I have a file. Each record needs to inserted into a table. The table also have other columns which needs to be inserted with Shell variables.
The following is the file.
Error code None.
Error Code 1
The shell script is having these variables.
Name=Magesh
Dep=Coding
... (1 Reply)
I have 'n' number of files in a folder .each file in the folder "myfolder" is having the content like.
COLNAME
------------
AAAAAA
BBBBBB
CCCCCC
DDDDDD
...
...
...
ZZZZZZ
26 recrod(s) selected.
My request is by reading each file in "myfolder" and format each file such a way... (18 Replies)
Hi,
I am reading a file line by line using read line function of while loop. Each line contains 4 fields. I want to take these 4 values in 4 variables in each iteration so that i can use them in my script. The issue here is that my awk command is returning awkward results -
Here is a sample line... (8 Replies)
Hi,
Here is the output of lpstat. I would like to read value of Queue which is(abxxxxb1)and status that is DOWN in first line. i dont care what is in second line. any one can help me.thanks
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- ---------... (5 Replies)
I would like to prompt for input and then use it as a variable in a script.
Something like this.
#!/bin/ksh
echo "What is your name?: \c"
read response
echo "Your name is $reply" >file.txt
done
exit 0
What am I missing?
Thanks, (7 Replies)