Search Results

Search: Posts Made By: tene
4,489
Posted By tene
Go to the relevant forum and click on New Thread...
Go to the relevant forum and click on New Thread on top left of the forum.
5,522
Posted By tene
Why are you using {"/home/user1/bin/outfile.out"}...
Why are you using {"/home/user1/bin/outfile.out"}
Just put filename alone without braces and ".
8,682
Posted By tene
Replace #!/bin/csh with #!/bin/sh
Replace #!/bin/csh with #!/bin/sh
8,896
Posted By tene
awk '{if( NR==1)print ">"FILENAME;else print}'...
awk '{if( NR==1)print ">"FILENAME;else print}' S5_SK1.chr01
11,794
Posted By tene
echo "0000000011179E0A" | sed 's/^0*//'
echo "0000000011179E0A" | sed 's/^0*//'
4,551
Posted By tene
Try this. awk '{arr[NR]=$1}...
Try this.

awk '{arr[NR]=$1} END{if(NR%2==0)print arr[NR/2]; else print arr[(NR-1)/2]}' inputfile
2,178
Posted By tene
awk '{arr[$1]+= $2}END{for (i in arr) print i"...
awk '{arr[$1]+= $2}END{for (i in arr) print i" "arr[i]}' inputfile
6,489
Posted By tene
If there are only two fields, this will work. ...
If there are only two fields, this will work.

awk -F"|" '{print $2"|"$1}' filename
1,334
Posted By tene
#!/bin/ksh for i in `ls path` do mv $i...
#!/bin/ksh
for i in `ls path`
do
mv $i $i.dat
done


path is the path where your files exist
85,651
Posted By tene
grep <pattern> <file> | tail -200
grep <pattern> <file> | tail -200
1,254
Posted By tene
Try this: 's/5 2 \* \* 2 root backupdat/5 5...
Try this:

's/5 2 \* \* 2 root backupdat/5 5 * * 3 root backupdat/' /etc/crontab
1,254
Posted By tene
This command will give you escaped * from your...
This command will give you escaped * from your grep command. Then use it in the final sed command.
grep <pattern> <file> | sed 's/*/\\*/g'
2,723
Posted By tene
sed -e 's/[\+][0-9 ]*/,&,/' -e...
sed -e 's/[\+][0-9 ]*/,&,/' -e 's/[a-z0-9_-.]*@[a-z0-9_-.]*/,&,/' inputfile
27,087
Posted By tene
echo "Enter the line number";read num; awk -v...
echo "Enter the line number";read num; awk -v line=$num '{if($1==line){for(i=1;i<=NF;i++){if($i ~ /-bwout/)x=$(i+1);if($i ~ /-bwin/)y=$(i+1);}}} END{print y" "x;}' file


file will have the...
22,092
Posted By tene
#!/bin/csh set QUERY='netscape' set...
#!/bin/csh
set QUERY='netscape'
set COUNT_NETSCAPE=`ps | grep -c $QUERY`
echo $COUNT_NETSCAPE
Showing results 1 to 15 of 15

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