441 reputation
147
bio website
location
age
visits member for 2 years, 7 months
seen 2 hours ago

I’m the enemy in the end.


Oct
18
comment Perl command not found
What's the results of: which perl?
Oct
13
comment Filtering output from the “dscl -readall” command
@Ali: I'm not completely sure I understand your first question. The code above will print out a block if it finds the word 'UniqueID' followed by a value greater or equal to 500. This block is a record and will include all the information it contains (this amount of information may change from record to record or it may not: I'm not familiar with dscl output). Regarding the second question; although awk is not ideal for reading xml, it can be used to write it. Please edit your question to include a good amount of sample data and expected output.
Oct
13
answered Filtering output from the “dscl -readall” command
Oct
12
awarded  Commentator
Oct
12
comment using sed, how to change the text on line seven to read seventh?
@Steve: Try, sed '7s/.*/seventh/' file.txt
Oct
10
comment Replacing quotes in a file
Yes a good simple solution; why didn't I think of that? You can use time to compare solutions and see what's faster. You may be surprised, sometimes these global substitutions can take a while. But if I were you, I'd probably still accept this answer based on it's simplicity.
Oct
9
comment Replacing quotes in a file
Personally, I like the sed pipe. It's surprisingly easier to read IMO. Both solutions work the same; If the line contains beginning and end quotes, remove them all. And add them back in at print time. Otherwise just remove them all. HTH.
Oct
9
revised Replacing quotes in a file
added 107 characters in body
Oct
9
awarded  Editor
Oct
9
revised Replacing quotes in a file
added 87 characters in body
Oct
9
answered Replacing quotes in a file
Oct
5
answered Input field separator in awk
Sep
29
answered numbering some content of a file using grep or any other commands
Sep
27
answered Is there any file content search tool that decompresses JAR files before looking into it?
Sep
22
awarded  Fanatic
Sep
16
awarded  Teacher
Sep
14
comment linux sort -n uniq -c
@Clustermagnet: You'd want to do sort first, then call uniq. Useless use of cat. Try: < text.txt sort -n | uniq -c
Sep
14
answered linux sort -n uniq -c
May
24
awarded  Enthusiast
May
23
comment How to get the pid of a running process using a single command that parse the output of ps?
+1 My usual use of pgrep: kill `pgrep xxx`