Search Results

Search: Posts Made By: gaurab
2,839
Posted By gaurab
-k1,1 tells sort that: first sort the file...
-k1,1 tells sort that: first sort the file alphabetically using column 1 as the key. (1,1) means only use the first column.
The option just "-k1" would mean use the whole line as key starting with...
1,940
Posted By gaurab
using shell script: make a shell script...
using shell script:

make a shell script (shell.sh) which takes 1 argument (data filename)

count=0
for i in `cat $1`
do
count=`expr $count + 1`
if [ $count -eq 1 ]
then
top=$i
fi
echo $i...
3,388
Posted By gaurab
Using awk If you just want to replace the . in...
Using awk
If you just want to replace the . in the 3rd column

awk '{if($3==".") print $1" "$2" NA";else print}' infile
Showing results 1 to 3 of 3

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