Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: cabrao
1,518
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,727
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
821
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,140
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,269
Posted By cabrao
awk -F\" '/^ *=/{print $2}' RS=LENGTH file
awk -F\" '/^ *=/{print $2}' RS=LENGTH file
919
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,667
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,874
Posted By cabrao
awk -F"character|numeric" '{print $1}'...
awk -F"character|numeric" '{print $1}' file
768
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
854
Posted By cabrao
awk -F"-" '/^Chr[0-9[X]/{print...
awk -F"-" '/^Chr[0-9[X]/{print $1":"$2-10"-"$2+10}' file
2,150
Posted By cabrao
paste file1 file2
paste file1 file2
2,252
Posted By cabrao
ESCAPE : 1,$s/\(^a.*,$\)/\1x
ESCAPE
:
1,$s/\(^a.*,$\)/\1x
1,829
Posted By cabrao
echo -e "service started successfully\n" >...
echo -e "service started successfully\n" > log
29,725
Posted By cabrao
Try: perl -lne 'print/(fkafal)/' or ...
Try:
perl -lne 'print/(fkafal)/'

or

sed -n 's/.*\(fkafal\).*/\1/p'
1,258
Posted By cabrao
Try: awk '/ORA/&&!/ORA-00001/' file
Try:
awk '/ORA/&&!/ORA-00001/' file
1,870
Posted By cabrao
awk -F/ 'NF>2{print $1,$NF}' file
awk -F/ 'NF>2{print $1,$NF}' file
1,945
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,094
Posted By cabrao
awk -F\| '$1=NR' OFS=\| file
awk -F\| '$1=NR' OFS=\| file
2,615
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,375
Posted By cabrao
$ sed 's/\(.*\)\(\".*\"\)\(.*\)\(\".*\"\)/\2...
$ sed 's/\(.*\)\(\".*\"\)\(.*\)\(\".*\"\)/\2 \4/g;s/\"//g' file
test test2 demo demo2
758
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,834
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
41,655
Posted By cabrao
$ DATE=20101018121445 $ DATE2=`echo $DATE | cut...
$ DATE=20101018121445
$ DATE2=`echo $DATE | cut -c1-8`
$ echo $DATE2
20101018
622
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 01:31 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy