Search Results

Search: Posts Made By: tene
4,542
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,598
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,743
Posted By tene
Replace #!/bin/csh with #!/bin/sh
Replace #!/bin/csh with #!/bin/sh
9,025
Posted By tene
awk '{if( NR==1)print ">"FILENAME;else print}'...
awk '{if( NR==1)print ">"FILENAME;else print}' S5_SK1.chr01
11,866
Posted By tene
echo "0000000011179E0A" | sed 's/^0*//'
echo "0000000011179E0A" | sed 's/^0*//'
4,620
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,190
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,583
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,341
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
86,369
Posted By tene
grep <pattern> <file> | tail -200
grep <pattern> <file> | tail -200
1,285
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,285
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,737
Posted By tene
sed -e 's/[\+][0-9 ]*/,&,/' -e...
sed -e 's/[\+][0-9 ]*/,&,/' -e 's/[a-z0-9_-.]*@[a-z0-9_-.]*/,&,/' inputfile
27,232
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,204
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 04:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy