how would i write a shell script to show the number of lines in which int variable appears in a c++ program.
how would i do this using cut or awk methods is it possbile and having a output similar to this
x, number of apperances =
y, number of apperances = (2 Replies)
I want to use awk instead of cut command.
Following is my code:
line="slNumber=US78AJF11643, slName=USJFKAAUSYDAAUL80441032900095, dummy sl found? sqlca.sqlcode=0"
sl_WORD=`echo $line| cut -f 1 -d','`
sl=`echo $sl_WORD | cut -f 2 -d'='`
echo "$sl"
Please suggest me about the code.
... (5 Replies)
This may just be a lack of experience talking, but I always assumed that when possible it was better to use a commands built in abilities rather than to pipe to a bunch of commands. I wrote a (very simple) script a while back that was meant to pull out a certain error code, and report back what... (4 Replies)
I have been reading for a few hours trying to educate myself enough to accomplish this task, so please know I have performed some research. Unfortunately, I am not a *NIX scripting expert, or a coder. I come from a network background instead.
SO, here is my desired outcome. I have some Cisco... (5 Replies)
Hi,
From the file "example" with lines like below, I need the int value associated with ENG , i.e, 123
SUB: ENG123, GROUP 1
SUB: HIS124, GROUP 1
..
..
Normally , i do
grep ENG example | cut -d ' ' -f 2 | cut -c 4-6
Is it possible to do it in simpler way using awk/sed ?
... (5 Replies)
Hello,
I trying to extract text that is surrounded by xml-tags. I tried this
cat tst.xml | egrep "<SERVER>.*</SERVER>" |sed -e "s/<SERVER>\(.*\)<\/SERVER>/\1/"|tr "|" " "
which works perfect, if the start-tag and the end-tag are in the same line, e.g.:
<tag1>Hello Linux-Users</tag1>
... (5 Replies)
hi people,
I have a text file containing data, seperated by TAB. I want to process this tab'ed data as variable. how can I assign this?
Ex:
Code:
11aaa 12000 13aaa 14aaa 15aaa 16aaa 17aaa
21aaa 22000 23aaa 24aaa 25aaa 26aaa 27aaa
31aaa 32000 33aaa 34aaa 35aaa 36aaa 37aaa... (1 Reply)
I have a file and need to only select users that have a shell of “/bin/bash” in the line using awk or sed please help (4 Replies)
Discussion started by: boyboy1212
4 Replies
LEARN ABOUT DEBIAN
asntool
ASNTOOL(1) NCBI Tools User's Manual ASNTOOL(1)NAME
asntool - process ASN.1 module specifications
SYNOPSIS
asntool [-] [-B filename] [-D N] [-G] [-I str] [-J type] [-K str] [-L str] [-M filename,...] [-P str] [-Q] [-S filename] [-T filename] [-V]
[-X filename] [-Z] [-b N] [-d filename] [-e filename] [-f filename] [-l filename] -m filename [-o filename] [-p filename] [-t str]
[-v filename] [-w N] [-x filename]
DESCRIPTION
asntool reads, validates, and displays ASN.1 module specifications.
OPTIONS
A summary of options is included below.
- Print usage message
-B filename
Generate objects and code in files named filename.*
-D N Debugging level for code generation:
0 No debugging (default)
1 Shallow debugging
2 Deep debugging
3-9 Same as 2
-G Generate object loader .c and .h files
-I str Put "#include str" in generated .c file
-J type
Register type type with object manager
-K str In generated .c, force name of #included asn header to str
-L str Label registered type as str
-M filename,...
Search the ASN.1 modules in filename,... for external references
-P str XML module prefix for DOCTYPE
-Q Use quoted syntax form for generated include files
-S filename
Send debugging output to filename rather than stderr
-T filename
Dump ASN.1 tree to filename
-V Force CHOICE objects to use custom structures rather than ValNodePtrs, for compatibility with some old hand-coded object loaders.
-X filename
Write XML DTD to filename. If filename is "m", print each module to a separate file.
-Z Bit twiddle for optional zero value base slots
-b N Use N-byte buffers (default = 1024; anything between 512 and 10000 is legal)
-d filename
Read binary values from filename (requires -t)
-e filename
Write binary values to filename
-f filename
Write ASN.1 module to filename
-l filename
Write ASN.1 loader to filename
-m filename
Read ASN.1 module from filename
-o filename
Write header to filename
-p filename
Write print values to filename
-t str Expect binary values to have type str
-v filename
Read print values from filename
-w N Limit values in #defines to N bits (default = 31; anything between 31 and 128 is legal)
-x filename
Write XML data to filename
AUTHOR
The National Center for Biotechnology Information.
NCBI 2010-09-01 ASNTOOL(1)