11-12-2011
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
When I type a command at the command line it supplies one result and the exact same command in a script
egrep '^01|^02|^03|^04' file > fileout
count = 29353
same count in the script yields a count of 23492
is there any reason this could be happening. (1 Reply)
Discussion started by: r1500
1 Replies
2. Shell Programming and Scripting
Hello
I have a pretty big problem here. I have a very large file having lines running into millions. A small sample of the data is shown below
<CRMSUB:MSIN=5000000013,BSNBC=TELEPHON-55108663-TS11&TS21&TS22,MSCAT=ORDINSUB,SUBRES=ALLPLMN-AIRSIMLA,BAOC=OIC,NUMTYP=MULTI;... (3 Replies)
Discussion started by: PradeepRed
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Can anyone translate in words what this line command does:
ls *.fits | grep -v "Zero\|zero" > objlist
Obviously ls *.fits means to list all the fits file, grep looks for a certain word, Zero is a certain fits file, and > objlist , created a list with certain items, but I am not sure what... (3 Replies)
Discussion started by: cosmologist
3 Replies
4. UNIX for Dummies Questions & Answers
Hi
Is there any way GREP command can return word and not complete line.
My file has following data:
Hello Everyone I am NitinrajSrivastava
Hi Friends Welcome VrajSrivastava
I am using grep 'raj' which is returning me complete line.However I want only the word having keyword 'raj'.
Required... (11 Replies)
Discussion started by: dashing201
11 Replies
5. Shell Programming and Scripting
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies
6. Shell Programming and Scripting
Hi,
I need to search a word in the java file.
Assume the line in the java file is, (the line was splitted into 3 lines)
1.operationContext.sendFeedback(2.FeedbackType.ERROR, null, "Input is empty.", "Input Details: pr
3.ovide Valid pair(s): "+pairType);
When i grep for the word... (6 Replies)
Discussion started by: tulasiram
6 Replies
7. Shell Programming and Scripting
Hello Dear Friends I have a question about grep command
when I type the command grep 'energy' mydata.txt it gives me
energy= 5001
energy= 8500
energy= 5505
energy= 5506
however I only want to see the last line. How can I use the grep command to pick the last line of grep output.
... (9 Replies)
Discussion started by: rpf
9 Replies
8. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
9. Shell Programming and Scripting
Hi,
I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file.
for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'`
do
.
.
done
How... (4 Replies)
Discussion started by: Srinraj Rao
4 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have some xml files and I need to find out all xml where one specific type of pattern is available..
Pattern 1
==========
<MAP TIMEOUT="" MODE="STANDALONE">
<COMMENT>without Any Mapping</COMMENT>
</MAP>
Pattern 2
==========
<MAP TIMEOUT="" MODE="STANDALONE">
... (4 Replies)
Discussion started by: Baharul
4 Replies
LEARN ABOUT OSX
mailcap.order
MAILCAP.ORDER(5) Order Mailcap Entries MAILCAP.ORDER(5)
NAME
/etc/mailcap.order - the mailcap ordering specifications
DESCRIPTION
The order of entries in the /etc/mailcap file can be altered by editing the /etc/mailcap.order file. Each line of that file specifies a
package and an optional mime type. Mailcap entries that match will be placed in the order of this file. Entries that don't match will be
placed later.
Example
mime-support:*/*
gv:application/postscript
netscape:text/html
less:text/*
emacs:text/*
The above would make any entries provided by the mime-support package (as found in the /usr/lib/mime/packages directory) take priority over
everything else. The gv package will be used over anything else when it comes to postscript documents. Netscape will be used for any html
documents and less will be used for any remaining text documents. However, since neither netscape or less provide for editing documents,
any edit or compose actions will fall through to the emacs rules.
After modifying this file, be sure to run /usr/sbin/update-mime (as root) to propagate the changes into the /etc/mailcap file.
Remember that this files takes package names and not executable names. If you want to define rules that reference specific programs, the
best way is to include them in ~/.mailcap or the user section of the /etc/mailcap file.
LIMITATIONS
There is currently no way to break out a certain type from a wildcard rule. If, for example, both xv and gimp were to specify "image/*"
rules, it isn't possible to use xv for gif images but use gimp for jpeg images.
Also, I would like to add the ability to specify certain actions in the rules. For example, if netscape were to have an edit rule but I
wanted to use emacs for editing/creating html documents, I could place a line like
emacs:text/* action=edit|compose
before the netscape entry. The update-mime program would then spit out entries such that netscape view rule comes before the emacs view
rule but have the netscape edit rule comes after the emacs edit rule.
SEE ALSO
mailcap(5) run-mailcap(1) update-mime(8)
AUTHOR
The mailcap.order specification was written by Brian White <bcwhite@pobox.com>
Debian Project 16th Aug 1998 MAILCAP.ORDER(5)