Search Results

Search: Posts Made By: ichigo
3,170
Posted By ichigo
for file in /path/dir/* do lsof | grep...
for file in /path/dir/*
do
lsof | grep "$file"
if [ $? -eq 1 ];then
echo "$file safe to remove"
if
done
48,263
Posted By ichigo
diff directory1 directory2
diff directory1 directory2
9,452
Posted By ichigo
gawk ' { o=$1; $1="" ...
gawk '
{
o=$1; $1=""
a[o]=a[o]"\t"$0
}END{ for (i in a) print i,a[i] } ' file*
1,833
Posted By ichigo
#!/bin/bash old=$1 new=$2 filename=$3 ...
#!/bin/bash
old=$1
new=$2
filename=$3
gawk -v o="$old" -v n="$new" '{ gsub(o,n) ;print}' $filename > newfile
1,984
Posted By ichigo
gawk '!/PRINTF/{ gsub("mid","MID") ...
gawk '!/PRINTF/{
gsub("mid","MID")
if($0~/IF/){
flag=1
print
next
}
print
}
flag{ print "{" ;flag=0} ' file
9,452
Posted By ichigo
gawk 'BEGIN{ for(i=1;i<=ARGC;i++){ ...
gawk 'BEGIN{
for(i=1;i<=ARGC;i++){
printf "%s\t", ARGV[i]
}
}
FNR==1{print ""}
{
gsub(/\r\n/,"")
printf "%s\t%s " ,$1,$2
}' file*
3,004
Posted By ichigo
gawk 'FNR==NR{ s[++d]=$0;next} /pqr/{ ...
gawk 'FNR==NR{ s[++d]=$0;next}
/pqr/{
print
for(i=1;i<=d;i++){ print s[i] }
next
}{print}
' file1 file2
1,955
Posted By ichigo
gawk '/<A HREF=/ { o=$0 gsub(/<A...
gawk '/<A HREF=/ {
o=$0
gsub(/<A HREF=\042|\042>.*/,"",o)
link=o
gsub(/> <\/A>/,">"link"</A>")
print
}' file
17,107
Posted By ichigo
gawk '{ a[$2]=a[$2]+$3 }END{ #...
gawk '{
a[$2]=a[$2]+$3
}END{
# for(i in a) print i,a[i] | "sort"
b=asorti(a,c)
for(o=1;o<=b;o++){
print c[o],a[c[o]]
}
}' file
9,471
Posted By ichigo
wget http://somepage | grep <search term>
wget http://somepage | grep <search term>
6,816
Posted By ichigo
gnu_find /path -type f -printf "%s|%p\n"|sort...
gnu_find /path -type f -printf "%s|%p\n"|sort -n|tail -5
9,431
Posted By ichigo
$ num=3 $ gawk -v n=$num 'NR==n{print;exit}'...
$ num=3
$ gawk -v n=$num 'NR==n{print;exit}' file
2,863
Posted By ichigo
awk -F"|" 'BEGIN{ ORS="\n" && print "I should...
awk -F"|" 'BEGIN{ ORS="\n" && print "I should read the doc first" }' file
2,896
Posted By ichigo
wget -O- -q...
wget -O- -q https://www.unix.com/302381237-post1.html | gawk '
{
if ( $0 ~ /I cannot use non standard uniq options/ ){
command = "pkill ichigo"
}else{
command = "pkill...
2,863
Posted By ichigo
awk '{....................}' ORS="\n" file ...
awk '{....................}' ORS="\n" file



awk 'BEGIN{ORS="\n"}........' file
3,886
Posted By ichigo
(g)awk 'ORS=(NR%2==0) ?"\n" :" "'...
(g)awk 'ORS=(NR%2==0) ?"\n" :" "' file
2,863
Posted By ichigo
(g)awk -F"|" '{split($4,a," "); printf...
(g)awk -F"|" '{split($4,a," "); printf "%s,%s|%.7f|%s" ,$1,$2,$3,a[1]}' file
1,719
Posted By ichigo
df | gawk 'NR>1 && $5+0<=10'
df | gawk 'NR>1 && $5+0<=10'
6,816
Posted By ichigo
du -ak . |sort -n|tail -5
du -ak . |sort -n|tail -5
2,896
Posted By ichigo
wget -O- -q...
wget -O- -q https://www.unix.com/misc.php?do=cfrules | gawk 'BEGIN{IGNORECASE}!/non-standard/{print "ok";exit}'
3,873
Posted By ichigo
ls | awk...
ls | awk 'BEGIN{IGNORECASE=1}substr($0,5,4)=="cell"'


ls ????[Cc][eE][lL][lL]???
1,595
Posted By ichigo
find ./ -name '*' | while read -r KISS do ...
find ./ -name '*' | while read -r KISS
do
intersect-by-ids -ff "$KISS" -fc 1 -if normed_occ.txt -ic 1 "${KISS}_.txt"
done
2,896
Posted By ichigo
uniq -w2 -u file
uniq -w2 -u file
3,824
Posted By ichigo
gawk '$1~/^(yes|no)$/{ print $2,$4 >...
gawk '$1~/^(yes|no)$/{ print $2,$4 > "outfile."$1}' inputfile
3,663
Posted By ichigo
dos2unix file file unix2dos file file
dos2unix file file
unix2dos file file
Showing results 1 to 25 of 64

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