Suppose I want to find the number of uniq lines in a file. I use the following command:
sort file1 | uniq -c | wc -l
But if for some reason sort fails, the above command returns 0 as the answer.
Why would sort fail ? sort makes use of directories /tmp or /var/tmp to store temporary files.... (7 Replies)
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Hi, could some help me convert CSV file (with double quoted strings) to pipe delimited file:
here you go with the same data:
1,Friends,"$3.99 per 1,000 listings",8158here " 1,000 listings " should be a single field.
Thanks,
Ram (8 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)
I am using grep to match a pattern, but the output is strange.
$ grep -r -o "pattern" *
Gives me:
Binary file foo1 matches
Binary file foo2 matches
Binary file foo3 matches
To find the lines before/after, I then have to use the following on each file:
$ strings foo1 | grep -A1 -B1... (0 Replies)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Hi guys,
I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file
for eg:
file 1:
xx|yy|"xyz|zzz"|zzz|12...
using below awk command
awk 'BEGIN {FS=OFS="|" } print $3
i would get xyz
But i want as :
xyz|zzz to consider as whole column... (13 Replies)
Hi,
my os is SLES 10
from sort
iostat
as my output does not include rkB/s and wkB/s I probably have to adjust the key position, so
is the following iostat pipe to sort service request command correct?
oracle@vmc_stallite:~> iostat -x | sort -nrk11
sda 0.96 ... (4 Replies)
Hello ppl
I have a requirement to split (cut in unix) a file (A.txt) which is a pipe delimited file into A1.txt and A2.txt
Now I have to join (paste in unix) this A2.txt with external file A3.txt to form
output file A4.txt which should be CSV (comma separated file) so that third party can... (25 Replies)
In the below awk to add a sort by smallest to largest should it be added after the END? Thank you :).
BEGIN {
FS="*"
}
# Read search terms from file1 into 's'
FNR==NR {
s
next
}
{
# Check if $5 matches one of the search terms
for(i in s) {
if($5 ~ i) {
... (4 Replies)