Search Results

Search: Posts Made By: Vikram_Tanwar12
639
Posted By pravin27
awk 'NR==FNR{a[$1]++;next} {split($3,b,"/") ...
awk 'NR==FNR{a[$1]++;next}
{split($3,b,"/")
s=b[2]"["$2"]"
if (a[s]){print}}' file2 file1
707
Posted By Yoda
awk -F'[][]' ' ...
awk -F'[][]' ' # Set ] [ as field separators.
{
A[++c] = $0 # Create indexed array: A for each record
...
707
Posted By Yoda
awk -F'[][]' '{if(A[$1]<$2) A[$1]=$2}END{for(k in...
awk -F'[][]' '{if(A[$1]<$2) A[$1]=$2}END{for(k in A) print k"["A[k]"]"}' file
1,166
Posted By Jotne
-F"[ /]+" Normal field separator is any space...
-F"[ /]+"
Normal field separator is any space or tab.
[] makes possible multiple field separator
" " (one single blank) and / is then used as field separator.
Since there are more than one blank...
1,166
Posted By Jotne
This is simple to solve. awk -F"[ /]+"...
This is simple to solve.
awk -F"[ /]+" '$2!~/^3/ {print $4"["$2"]"}' file >outfile
cat outfile
Procs_Val_toTerm_Ret_Contrct_BPEL[2.0]
Qualfy_BP_forNew_Ret_Contrct_BPEL[2.0]...
1,224
Posted By bakunin
Ahem... sorry, but both are wrong. If you want to...
Ahem... sorry, but both are wrong. If you want to compare strings you have to write:

if [ "$v_count_1" == "0" ]

Notice not only the quotes around BOTH values but also the double equal signs. It...
565
Posted By pamu
For uniq file needs to be sorted. Try at the...
For uniq file needs to be sorted.

Try at the end...:)

sort | uniqORsort -uORawk '!X[$0]++'
565
Posted By sathyaonnuix
Have you tried sort -u
Have you tried sort -u
1,085
Posted By Scrutinizer
awk alternative awk -F'Successfully added | to...
awk alternative
awk -F'Successfully added | to the Content' 'NF>2{print $2}'
1,085
Posted By itkamaraj
two substitute operations are performed on the...
two substitute operations are performed on the file.


s/^Successfully added //
s/ to the Content Manager//


This also can be splitted like...

sed -e 's/^Successfully added //' -e 's/...
1,085
Posted By itkamaraj
sed 's/^Successfully added //;s/ to the Content...
sed 's/^Successfully added //;s/ to the Content Manager//' input.txt
1,085
Posted By Scrutinizer
Regarding the difference with the sed command:...
Regarding the difference with the sed command: Your original sample contains a trailing dot, which DGPickett's suggestion takes into account. Replace\.$ with .* and it should work.
1,085
Posted By DGPickett
$ sed -n 's/^Successfully added \(.*\) to the...
$ sed -n 's/^Successfully added \(.*\) to the Content Manager\.$/\1/p' <your_files>
Showing results 1 to 13 of 13

 

Featured Tech Videos

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