Search Results

Search: Posts Made By: looney
6,144
Posted By looney
Modified vgresh99 script awk -F';' ' /^;/...
Modified vgresh99 script

awk -F';' ' /^;/ {next } FNR>1 { $2=($2) ? "Disabled":"Enabled"}1' OFS=';' file
6,144
Posted By looney
bashwhile IFS=";" read f1 f2 do [[ $f2 ==...
bashwhile IFS=";" read f1 f2
do
[[ $f2 == "S" ]] && echo "$f1;Disabled" || { echo "$f1;Enabled" ;}
done < file
1,475
Posted By looney
awkawk -FS=" |;|=" '$2 < 0.4' file grepgrep...
awkawk -FS=" |;|=" '$2 < 0.4' file
grepgrep "AF=0.[0-3]" file
2,595
Posted By looney
If value of field is not null still you are...
If value of field is not null still you are subtracting filed 2 and field 5.
awk '{ print (NF<6 ? $1" "$2" "$3" "$2-$4" "$4" "$5 : $0)}' file
1,009
Posted By looney
Hi Znesotomayor, you can also save your excel...
Hi Znesotomayor,
you can also save your excel as pipe delimited.Keeping JunJun,Binay as it is.
follow the below steps.

press window tab
type regional and language
go to additional settings...
1,337
Posted By looney
Hi Balav, can we break this in two steps. by...
Hi Balav,
can we break this in two steps.
by sed and awk.
sed -i 's/"//g' file
awk 'BEGIN{print "user,phone,duration,login,ip_address";RS="";OFS=",";FS="="} { print $2 OFS $4 OFS $6 OFS $8 OFS...
1,616
Posted By looney
by sed sed -i -e "s/exec/\$query1=\'exec/gi"...
by sed
sed -i -e "s/exec/\$query1=\'exec/gi" -e "s/^)/)\'/gi" -e "s/^\/\*.*//gi" file
2,104
Posted By looney
If that is the case , then you have to set env...
If that is the case , then you have to set env variables in your script. Just source export PATH=${PATH}:${HOME}/bin (for eg) into your script at the top and it will work.
2,516
Posted By looney
by awk echo "user lastname" | awk ' { print...
by awk

echo "user lastname" | awk ' { print substr ($1,1,7) substr($2,1,1) } '
2,327
Posted By looney
awk ' NF && !/^ / { ...
awk '
NF && !/^ / {
ofile = $1
next
}
NF && /^ / {
print $1 >> ofile
close(ofile)
}
'...
1,394
Posted By looney
Hi you were quite near:), use below code ...
Hi
you were quite near:), use below code

echo "hello_come_here_g0f0_ffg0" | rev | cut -d"_" -f3- | rev
echo "Hello_h_be_an_f_g1f1_ffe0" | rev | cut -d"_" -f3- | rev
Showing results 1 to 11 of 11

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