I have written following code to do: ls -l | wc -w, it works:
but when there are not only a single "|", if there are more such as:
ls -l | sort -r | sort | sort -r, This program does not work, i want to know how could i deal with it when there are more "|", another situation is that, if it mixes... (2 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi all,
Is there anyway to make awk talk to DB ? So my awk script reads the data from some text file and eventually those data need to be stored in database.
So is there anyway to do it in awk all tohether, say any awk-ODBC tool to make it work? (I really hate to write a cpp/java program... (4 Replies)
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
This is the script:
#!/bin/sh
if ; then rm -rf /usr/share/WallpaperChanger; fi
if ; then rm -rf /usr/bin/wallch; fi;
if ; then rm -rf /usr/share/applications/wallch.desktop; fi
if ; then rm -rf /usr/share/doc/wallch; fi
if ; then rm -rf /usr/share/man/man1/wallch.1.gz; fi
echo "Delete... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hi,
I'm dealing with an issue and losing a lot of hours figuring out how i would solve this.
I have an input file which looks like this:
('BLABLA +200-GRS','Serviço ','TarifaçãoServiço','wap.bla.us.0000000121',2985,0,55,' de conversão em escada','Dia','Domingos')
('BLABLA +200-GRR','Serviço... (6 Replies)
Hello. I'm new to the command line and am self teaching how to use it. I have a .csv file that contains the following data:
5,10,15,30,8,3,9,10,11,3,12
I'm trying to write an awk script that will "clamp" a number that is > 10 to 10. (i.e. 30 will become 10 but 5 would stay as 5)
The output is... (7 Replies)
Discussion started by: Eric7giants
7 Replies
LEARN ABOUT LINUX
erl_comment_scan
erl_comment_scan(3erl) Erlang Module Definition erl_comment_scan(3erl)NAME
erl_comment_scan - Functions for reading comment lines from Erlang source code.
DESCRIPTION
Functions for reading comment lines from Erlang source code.
DATA TYPES
comment() = {integer(), integer(), integer(), [string()]} :
EXPORTS
file(FileName::filename() (see module file)) -> [Comment]
Types Comment = {Line, Column, Indentation, Text}
Line = integer()
Column = integer()
Indentation = integer()
Text = [string()]
Extracts comments from an Erlang source code file. Returns a list of entries representing multi-line comments, listed in order of
increasing line-numbers. For each entry, Text is a list of strings representing the consecutive comment lines in top-down order; the
strings contain all characters following (but not including) the first comment-introducing % character on the line, up to (but not
including) the line-terminating newline.
Furthermore, Line is the line number and Column the left column of the comment (i.e., the column of the comment-introducing % char-
acter). Indent is the indentation (or padding), measured in character positions between the last non-whitespace character before the
comment (or the left margin), and the left column of the comment. Line and Column are always positive integers, and Indentation is a
nonnegative integer.
Evaluation exits with reason {read, Reason} if a read error occurred, where Reason is an atom corresponding to a Posix error code;
see the module file(3erl) for details.
join_lines(Lines::[CommentLine]) -> [Comment]
Types CommentLine = {Line, Column, Indent, string()}
Line = integer()
Column = integer()
Indent = integer()
Comment = {Line, Column, Indent, Text}
Text = [string()]
Joins individual comment lines into multi-line comments. The input is a list of entries representing individual comment lines, in
order of decreasing line-numbers ; see scan_lines/1 for details. The result is a list of entries representing multi-line comments,
still listed in order of decreasing line-numbers , but where for each entry, Text is a list of consecutive comment lines in order of
increasing line-numbers (i.e., top-down).
See also: scan_lines/1 .
scan_lines(Text::string()) -> [CommentLine]
Types CommentLine = {Line, Column, Indent, Text}
Line = integer()
Column = integer()
Indent = integer()
Text = string()
Extracts individual comment lines from a source code string. Returns a list of comment lines found in the text, listed in order of
decreasing line-numbers, i.e., the last comment line in the input is first in the resulting list. Text is a single string, contain-
ing all characters following (but not including) the first comment-introducing % character on the line, up to (but not including)
the line-terminating newline. For details on Line , Column and Indent , see file/1 .
string(Text::string()) -> [Comment]
Types Comment = {Line, Column, Indentation, Text}
Line = integer()
Column = integer()
Indentation = integer()
Text = [string()]
Extracts comments from a string containing Erlang source code. Except for reading directly from a string, the behaviour is the same
as for file/1 .
See also: file/1 .
AUTHORS
Richard Carlsson <richardc@it.uu.se >
syntax_tools 1.6.7 erl_comment_scan(3erl)