Search Results

Search: Posts Made By: tene
4,480
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,504
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,853
Posted By tene
awk '{if( NR==1)print ">"FILENAME;else print}'...
awk '{if( NR==1)print ">"FILENAME;else print}' S5_SK1.chr01
11,741
Posted By tene
echo "0000000011179E0A" | sed 's/^0*//'
echo "0000000011179E0A" | sed 's/^0*//'
4,513
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,166
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,464
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,332
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,395
Posted By tene
grep <pattern> <file> | tail -200
grep <pattern> <file> | tail -200
1,243
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'
1,243
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
2,704
Posted By tene
sed -e 's/[\+][0-9 ]*/,&,/' -e...
sed -e 's/[\+][0-9 ]*/,&,/' -e 's/[a-z0-9_-.]*@[a-z0-9_-.]*/,&,/' inputfile
8,674
Posted By tene
Replace #!/bin/csh with #!/bin/sh
Replace #!/bin/csh with #!/bin/sh
27,022
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,053
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:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy