Search Results

Search: Posts Made By: tene
4,556
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,607
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,757
Posted By tene
Replace #!/bin/csh with #!/bin/sh
Replace #!/bin/csh with #!/bin/sh
9,042
Posted By tene
awk '{if( NR==1)print ">"FILENAME;else print}'...
awk '{if( NR==1)print ">"FILENAME;else print}' S5_SK1.chr01
11,895
Posted By tene
echo "0000000011179E0A" | sed 's/^0*//'
echo "0000000011179E0A" | sed 's/^0*//'
4,634
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,192
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,598
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,503
Posted By tene
grep <pattern> <file> | tail -200
grep <pattern> <file> | tail -200
1,298
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,298
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,741
Posted By tene
sed -e 's/[\+][0-9 ]*/,&,/' -e...
sed -e 's/[\+][0-9 ]*/,&,/' -e 's/[a-z0-9_-.]*@[a-z0-9_-.]*/,&,/' inputfile
27,243
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,225
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 06:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy