Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Count special symbols between each unit Post 302935548 by yuejian on Tuesday 17th of February 2015 11:31:53 AM
Old 02-17-2015
Count special symbols between each unit

Can anybody help me figure this out? Thank you in advance.
I have a input file. It shows like this:
Code:
Query= random content
random content
> random content
random content
> random content
> random content

Query= random content
random content
random content
> random content
> random content

Query= random content
> random content

Query= random content
> random content
> random content
random content
random content
> random content
> random content
......

This file has multiple units and each unit's first line start with "Query=". The lines and content between each unit are random but the symbol ">" is always at the first position of a line. I want to list how many ">" in each units. So in this case, I am expecting the output file like this:
Code:
3
2  
1
4
......

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting MAC from GPS unit

Never mind i got the answer thanks., (0 Replies)
Discussion started by: deaconf19
0 Replies

2. Shell Programming and Scripting

Urgent: How to eliminate special symbols in a file and how to read it

Hi, I have file called suppliersList.txt --------------------------------- 112|MIMUS|krish@google.com 113|MIMIRE|krish@google.com 114|MIMCHN|krish@google.com 115|CEL|krish@google.com 108|UGEN|krishn@google.com 109|SLAND|krish@google.com i have 3 varibale ------------- no Name... (4 Replies)
Discussion started by: kittusri9
4 Replies

3. Shell Programming and Scripting

Migration unit testing process

Hi, We are doing migration from DB2 to Teradata. There are couple of things involving in the project. Please see below following order Autosys-Jil script Profile script Category1 Teradata script Data stage job script Tera data script Export files script.. Like that we have 10000... (1 Reply)
Discussion started by: onesuri
1 Replies

4. Solaris

Special symbols in shell scripting

I am new to unix shell scripting, i was going through the existing shell scripts but couldn't able to get enough information on below syntaxes,i mean the symbols $# & $? used in the if loop. what exactly are they? what is the inline meaning, Could you please throw some light. Examples: 1) ... (4 Replies)
Discussion started by: Ariean
4 Replies

5. UNIX for Advanced & Expert Users

Help with connecting 3 or 4 computers to one stereo unit

Nowadays I run Mandriva, Ubuntu and Fedora Core. All of the operating systems works fine on my computers. GRUB gives me the opportunity to select an operating system. I have Windows too. I don't run Windows. I like UNIX. Today I work with 3 computers with a single monitor. This is possible... (4 Replies)
Discussion started by: Angelo
4 Replies

6. Shell Programming and Scripting

Include special system characters in file count

Hi, I have a script that checks the length of each record/line in file - This seems to be working when there are no special systems character that are invisible or hidden. awk -v file=$file '{ if (filename==file) { k+=$5 if (length() <= 10 ){print size length(), "bytes " k} }... (2 Replies)
Discussion started by: asemota
2 Replies

7. Shell Programming and Scripting

Set of 2 records as one unit

Hi Experts, back at this forum again. Have a tab separated file like this --- ACCNN AMT(E/$) TYPE ID 11233 23.20($) AUTH 339 11233 19.00($) FINAL 339 11234 349.84($) AUTH 42332 11234 ... (12 Replies)
Discussion started by: PG3
12 Replies

8. HP-UX

Load average unit

Hi, On load average graph, unit is 100m, 200m, 300...800m. I don't understand what it means. Thx for helping (3 Replies)
Discussion started by: Michenux
3 Replies

9. UNIX for Dummies Questions & Answers

Simple unit script

Hello guys this is my first post in this forum. Since now ive been passive an ive only been looking for existing information. Now I could use specific help on a UNIX script i want to make that would: 1. Take 1-3 arguments. 2. Display the contents of its arguments, formatted as follows:... (7 Replies)
Discussion started by: banzomaster
7 Replies
KSTASH(8)						    BSD System Manager's Manual 						 KSTASH(8)

NAME
kstash -- store the KDC master password in a file SYNOPSIS
kstash [-e string | --enctype=string] [-k file | --key-file=file] [--convert-file] [--random-key] [--master-key-fd=fd] [--random-key] [-h | --help] [--version] DESCRIPTION
kstash reads the Kerberos master key and stores it in a file that will be used by the KDC. Supported options: -e string, --enctype=string the encryption type to use, defaults to DES3-CBC-SHA1. -k file, --key-file=file the name of the master key file. --convert-file don't ask for a new master key, just read an old master key file, and write it back in the new keyfile format. --random-key generate a random master key. --master-key-fd=fd filedescriptor to read passphrase from, if not specified the passphrase will be read from the terminal. FILES
/var/heimdal/m-key is the default keyfile if no other keyfile is specified. The format of a Heimdal master key is the same as a keytab, so ktutil list can be used to list the content of the file. SEE ALSO
kdc(8) HEIMDAL
April 10, 2007 HEIMDAL
All times are GMT -4. The time now is 08:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy