Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: cabrao
1,467
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 ;)
1,680
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
806
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,125
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,185
Posted By cabrao
awk -F\" '/^ *=/{print $2}' RS=LENGTH file
awk -F\" '/^ *=/{print $2}' RS=LENGTH file
899
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
1,654
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,855
Posted By cabrao
awk -F"character|numeric" '{print $1}'...
awk -F"character|numeric" '{print $1}' file
761
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
846
Posted By cabrao
awk -F"-" '/^Chr[0-9[X]/{print...
awk -F"-" '/^Chr[0-9[X]/{print $1":"$2-10"-"$2+10}' file
2,117
Posted By cabrao
paste file1 file2
paste file1 file2
2,196
Posted By cabrao
ESCAPE : 1,$s/\(^a.*,$\)/\1x
ESCAPE
:
1,$s/\(^a.*,$\)/\1x
1,799
Posted By cabrao
echo -e "service started successfully\n" >...
echo -e "service started successfully\n" > log
28,715
Posted By cabrao
Try: perl -lne 'print/(fkafal)/' or ...
Try:
perl -lne 'print/(fkafal)/'

or

sed -n 's/.*\(fkafal\).*/\1/p'
1,235
Posted By cabrao
Try: awk '/ORA/&&!/ORA-00001/' file
Try:
awk '/ORA/&&!/ORA-00001/' file
1,849
Posted By cabrao
awk -F/ 'NF>2{print $1,$NF}' file
awk -F/ 'NF>2{print $1,$NF}' file
1,934
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,078
Posted By cabrao
awk -F\| '$1=NR' OFS=\| file
awk -F\| '$1=NR' OFS=\| file
2,588
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...
3,337
Posted By cabrao
$ sed 's/\(.*\)\(\".*\"\)\(.*\)\(\".*\"\)/\2...
$ sed 's/\(.*\)\(\".*\"\)\(.*\)\(\".*\"\)/\2 \4/g;s/\"//g' file
test test2 demo demo2
749
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
3,745
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
40,844
Posted By cabrao
$ DATE=20101018121445 $ DATE2=`echo $DATE | cut...
$ DATE=20101018121445
$ DATE2=`echo $DATE | cut -c1-8`
$ echo $DATE2
20101018
615
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

 

Featured Tech Videos

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