Search Results

Search: Posts Made By: ggmas
2,050
Posted By ggmas
Try this: #!/bin/bash cmd=$(ls *.vector) ...
Try this:

#!/bin/bash
cmd=$(ls *.vector)
for f in $cmd
do
directory=$(echo $f|awk -F . '{print $1}')
mv $f $directory
done

I assumed that the directory where you want to...
10,970
Posted By ggmas
awk...
awk 'BEGIN{first_line=0;divide_by=1;}{if(first_line==0){first_line=1; divide_by=$2;}print $2/divide_by;}END{}' your_file

The column is indicated by the value after $, in this case $2 means that...
10,970
Posted By ggmas
try this: awk...
try this:

awk 'BEGIN{first_line=0;divide_by=1;}{if(first_line==0){first_line=1; divide_by=$1;}print $1/divide_by;}END{}' your_file
it doesn't care about the number of column the file has, it...
Showing results 1 to 3 of 3

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