pick first 100 symbols along with its contents


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting pick first 100 symbols along with its contents
# 1  
Old 07-23-2009
pick first 100 symbols along with its contents

input
>aa1
aaaaaa
>dd2
aggggg

I have a file with 6000 >IDS and their values
I need to filter 1st 100 names start with > and their values
after that I need to do it for second 100
# 2  
Old 07-23-2009
You said "after that I need to do it for second 100 "
You need to do what with the first 100?
Be more explicit.
I take it that you are looking for 200 lines (since you are paring them)?
The below line will get you the first 200 lines.
Code:
sed -n '1,200 p' input.txt

You can develop based on this.
# 3  
Old 07-23-2009
sorry

I think I can do the same with head -10 filename but I'm looking to doing some thing like this

i need to extract the 1st 100 or other that start with symbol ">"

what i mean is

>a1 to >a100 (just for example)

>a1 along with their values
aaaaaaaa
.........
...
>a2
hhhhhh
.........
...
to

>a100
ssssssssssss
........
....

---------- Post updated at 11:50 PM ---------- Previous update was at 10:38 PM ----------

I solved it

Guys


Please Ignore this thread

Last edited by repinementer; 07-23-2009 at 03:55 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Errno.h symbols

Hi, I need to look at a recent copy of /usr/include/errno.h from AIX 7.2 to check some symbols. In particular, I'm curious if it defines EOWNERDEAD and ENOTRECOVERABLE. Can someone who has access to 7.2 please check for me? Thanks! (1 Reply)
Discussion started by: topcat
1 Replies

2. Shell Programming and Scripting

If contents of A are in B then move the common contents to C

Hallo Team, I have 2 .csv files file A has 47600 lines and file B has 67000 lines FILEA SD0o9rb01-1d320ddbcc8d220f572739ebed5f58d1-v300g00 SD8bt0101-a0810bfe0e3396060126ec51b30dac0a-v300g00 SD05sce01-cb056af347ed4651f29eb3c3e9addbd6-v300g00... (3 Replies)
Discussion started by: kekanap
3 Replies

3. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

4. UNIX for Dummies Questions & Answers

Help with understanding the symbols '~#' and '~$'

I noticed that sometimes there is "~#" or "~$" in the terminal. What is that? I can't make any research in google because I don't know what are they called. I even tried reading pdf's or books but unfortunately, I wasn't lucky to find out. Maybe I was not persistent enough but I am really... (3 Replies)
Discussion started by: chams
3 Replies

5. Programming

cc -- Unsatisfied symbols -- on HP-UX 10.2

Greetings, I am slowly learning a few things but am far from being an expert. I am at the point now that I would like to be able write some ANSI C code on HP-UX 10.2. Just a hobbie... I am just using cc, which came with the HP-UX 10.2 ... I don't have the manuals for the development... (7 Replies)
Discussion started by: Dirk_
7 Replies

6. Shell Programming and Scripting

redirecting symbols

Can anyone please tell me what the following do 1. < 2. << Thanks Calypso (1 Reply)
Discussion started by: Calypso
1 Replies

7. AIX

Unresolved symbols

Hello experts , i have some strange problem, i wanted to create a shared object in AIX 5.3 for which i have compiled all my .cxx to .o which worked fine and then i created the .so from them , but when i do nm -Bo sample.so , i have many unresolved symbol, including printf... (0 Replies)
Discussion started by: vin_pll
0 Replies

8. Shell Programming and Scripting

Filtering symbols from contents

Hi, Any one of you guys can you help me out to filter all "," (single comma) from the below attached contents in a file. sportiva:root:/home/users/thayata/test # cat sample2.csv Heading,Sub Heading,,Detail Server details,Deployment environment:,,Standard Datacentre DC1 ,Chassis... (2 Replies)
Discussion started by: ajilesh
2 Replies

9. Linux

cp first ~/bin what is ~ symbols importance in this.

What would be the importance of ~ in this command. cp first ~/bin Thanks from dumb (1 Reply)
Discussion started by: singh85
1 Replies

10. Programming

undefined symbols

i am trying to compile transcode on AIX v 4.3.3 with gcc 3.0.1 i am getting this error: gcc -shared -o .libs/libexport_null.so.0 export_null.o -lpthread -ldl -lc -Wl,-bnoentry -Wl,-bexport:.libs/libexport_null.exp ld: 0711-317 ERROR: Undefined symbol: capability_flag ld: 0711-317... (0 Replies)
Discussion started by: thalex
0 Replies
Login or Register to Ask a Question