Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to exclude first and last lines while reading data into a sequential file(having some 1000 records).I guess probably by using unix filter option but not sure which to use

Answer Posted / shar

Well if must use filter option in sequential stage then
the Ans is:

head -n 10 'FileName' | tail -n 8

explanation:
suppose if ur file has 10 records + column name then total
lines are 11.
col1
1
2
3
4
5
6
7
8
9
10

head -n 10 will fetch column name + 9 records
and
tail -n 8 will fetch 2 to 9 records excluding colname and
1st record.
like :
2
3
4
5
6
7
8
9
Thats it.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which commands are used to import and export the datastage jobs?

1415


EXPLAIN SCD

1414


how to write server Routine coding?

2132


What is the use of datastage designer?

1159


How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...

1514


Can anyone tell me a difficult situation who have handled while creating Datastage jobs?

3250


Define Data Stage?

1100


1.new record it will insert but changes of natural key is not present in taget i want to update (here key is composite natural key )can any one help this to explan how to do

2094


What is the difference between in process and inter process?

1159


How to read multiple files using a single datastage job if files have the same metadata?

1255


What are the types of views in datastage director?

1777


how do u catch bad rows from OCI stage? And what CLI stands for?

2803


what are the devoleper roles in real time? plz tell i am new to datastage....

2164


Differentiate between datastage and datastage tx?

1059


Different ways a project can be moved to production ?...example ….export-import and Version control.

2455