I have a text file like:
The name of the project = "Symbion centrifuge"
The name of the subsytem = "motor demon"
now i would like to read the string after the = into a variable to write it to another file.
later use like:
sed s/'PROJECTNAME'/"$projectname"/ <header.tex >temp
... (9 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)
i am having text file below
NARGU S S 12358 SALES REP |22| Acccount/s
RAJU R B 64253 SALES REP |12| Acccount/s
RUKMAN S 32588 SALES REP |10| Acccount/s
NARGUND S S 12356... (3 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 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)
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Hi Experts.
I'm stuck with the below AWK code where i'm trying to move the records containing any special characters in the last field to a bad file.
awk -F, '{if ($NF ~ /^|^/) print >"goodfile";else print >"badfile"}' filename
sample data
1,abc,def,1234,A *
2,bed,dec,342,* A ... (6 Replies)
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
LEARN ABOUT V7
refer
REFER(1) General Commands Manual REFER(1)NAME
refer, lookbib - find and insert literature references in documents
SYNOPSIS
refer [ option ] ...
lookbib [ file ] ...
DESCRIPTION
Lookbib accepts keywords from the standard input and searches a bibliographic data base for references that contain those keywords anywhere
in title, author, journal name, etc. Matching references are printed on the standard output. Blank lines are taken as delimiters between
queries.
Refer is a preprocessor for nroff or troff(1) that finds and formats references. The input files (standard input default) are copied to
the standard output, except for lines between .[ and .] command lines, which are assumed to contain keywords as for lookbib, and are
replaced by information from the bibliographic data base. The user may avoid the search, override fields from it, or add new fields. The
reference data, from whatever source, are assigned to a set of troff strings. Macro packages such as ms(7) print the finished reference
text from these strings. A flag is placed in the text at the point of reference; by default the references are indicated by numbers.
The following options are available:
-ar Reverse the first r author names (Jones, J. A. instead of J. A. Jones). If r is omitted all author names are reversed.
-b Bare mode: do not put any flags in text (neither numbers nor labels).
-cstring
Capitalize (with CAPS SMALL CAPS) the fields whose key-letters are in string.
-e Instead of leaving the references where encountered, accumulate them until a sequence of the form
.[
$LIST$
.]
is encountered, and then write out all references collected so far. Collapse references to the same source.
-kx Instead of numbering references, use labels as specified in a reference data line beginning %x; by default x is L.
-lm,n Instead of numbering references, use labels made from the senior author's last name and the year of publication. Only the first m
letters of the last name and the last n digits of the date are used. If either m or ,n is omitted the entire name or date respec-
tively is used.
-p Take the next argument as a file of references to be searched. The default file is searched last.
-n Do not search the default file.
-skeys
Sort references by fields whose key-letters are in the keys string; permute reference numbers in text accordingly. Implies -e. The
key-letters in keys may be followed by a number to indicate how many such fields are used, with + taken as a very large number. The
default is AD which sorts on the senior author and then date; to sort, for example, on all authors and then title use -sA+T.
To use your own references, put them in the format described in pubindex(1) They can be searched more rapidly by running pubindex(1) on
them before using refer; failure to index results in a linear search.
When refer is used with eqn, neqn or tbl, refer should be first, to minimize the volume of data passed through pipes.
FILES
/usr/dict/papers directory of default publication lists and indexes
/usr/lib/refer directory of programs
SEE ALSO REFER(1)