Search Results

Search: Posts Made By: cabrao
3,450
Posted By cabrao
There was a typo in my previous comment, you need...
There was a typo in my previous comment, you need to add option -n (for numeric sort)

Cheers ;)
3,296
Posted By cabrao
$ awk -F'[- ]' '{print $1, $3}' a ID_090 2 ...
$ awk -F'[- ]' '{print $1, $3}' a
ID_090 2
ID_3787 4
ID_0098 1
ID_12 4
1,383
Posted By cabrao
$ awk -F: 'sub(FS $NF,z)' file Jun 13 12:59 ...
$ awk -F: 'sub(FS $NF,z)' file
Jun 13 12:59
Jun 13 13:02
Jun 13 13:14
1,665
Posted By cabrao
Not pretty, but should fit your request awk...
Not pretty, but should fit your request
awk '/\"\.\"/{print>"dot.txt"};/\"=\"/{print>"equal.txt"};/\"j\"/{print>"jack.txt"};!/\"[\.=j]\"/{print>"remaining.txt"}' inputfile
1,733
Posted By cabrao
awk -F\" '/^ *=/{print $2}' RS=LENGTH file
awk -F\" '/^ *=/{print $2}' RS=LENGTH file
2,108
Posted By cabrao
Try this to print filename and line containing...
Try this to print filename and line containing string "Version"
find . -name example.xml -exec awk '/Version/{print FILENAME,$0}' {} \;
1,265
Posted By cabrao
$ grep -o -f reference_data.txt input_data.txt |...
$ grep -o -f reference_data.txt input_data.txt | sort | uniq -c
1 CC
2 GHTAS
3 N
1 QER
2,271
Posted By cabrao
awk -F"character|numeric" '{print $1}'...
awk -F"character|numeric" '{print $1}' file
1,030
Posted By cabrao
If you just want to count the number of...
If you just want to count the number of occurences try this:
$ awk '/poc=4060.*loc=JPN$/{++c}END{print c}' file

or
$ cat pattern.txt
poc=4060.*loc=JPN

$ grep -c -f pattern.txt file
2,895
Posted By cabrao
paste file1 file2
paste file1 file2
3,212
Posted By cabrao
ESCAPE : 1,$s/\(^a.*,$\)/\1x
ESCAPE
:
1,$s/\(^a.*,$\)/\1x
2,252
Posted By cabrao
echo -e "service started successfully\n" >...
echo -e "service started successfully\n" > log
1,091
Posted By cabrao
awk -F"-" '/^Chr[0-9[X]/{print...
awk -F"-" '/^Chr[0-9[X]/{print $1":"$2-10"-"$2+10}' file
42,378
Posted By cabrao
Try: perl -lne 'print/(fkafal)/' or ...
Try:
perl -lne 'print/(fkafal)/'

or

sed -n 's/.*\(fkafal\).*/\1/p'
1,792
Posted By cabrao
Try: awk '/ORA/&&!/ORA-00001/' file
Try:
awk '/ORA/&&!/ORA-00001/' file
2,569
Posted By cabrao
awk -F/ 'NF>2{print $1,$NF}' file
awk -F/ 'NF>2{print $1,$NF}' file
2,240
Posted By cabrao
Have you tried PuTTYgen and Pageant? :) ...
Have you tried PuTTYgen and Pageant? :)

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html (http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html)
2,422
Posted By cabrao
awk -F\| '$1=NR' OFS=\| file
awk -F\| '$1=NR' OFS=\| file
3,232
Posted By cabrao
I didn't read the part saying "..files...
I didn't read the part saying "..files created..." sorry.

I don't know how to do it and according to the UNIX FAQ, it is not possible to see the file creation time.

Files have a last-modified...
979
Posted By cabrao
awk -v v1=`cat file_b` '{print substr($1,v1,1)}'...
awk -v v1=`cat file_b` '{print substr($1,v1,1)}' file_a
4,311
Posted By cabrao
$ sed 's/\(.*\)\(\".*\"\)\(.*\)\(\".*\"\)/\2...
$ sed 's/\(.*\)\(\".*\"\)\(.*\)\(\".*\"\)/\2 \4/g;s/\"//g' file
test test2 demo demo2
5,398
Posted By cabrao
For the trailer record: $ awk '{s+=$3}END{print...
For the trailer record:
$ awk '{s+=$3}END{print "trailer record, "s}' infile
trailer record, 250
50,051
Posted By cabrao
$ DATE=20101018121445 $ DATE2=`echo $DATE | cut...
$ DATE=20101018121445
$ DATE2=`echo $DATE | cut -c1-8`
$ echo $DATE2
20101018
772
Posted By cabrao
unzip -l AMT1-NA-20101007-1.zip | awk...
unzip -l AMT1-NA-20101007-1.zip | awk '/[0-9]:[0-9]/ {print $4,$1}'
Showing results 1 to 24 of 24

 
All times are GMT -4. The time now is 10:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy