Search Results

Search: Posts Made By: itkamaraj
2,435
Posted By itkamaraj
awk -v value="$value" 'NR==7{$0=$0" "value}1'...
awk -v value="$value" 'NR==7{$0=$0" "value}1' input > /tmp/output
mv /tmp/output input

-v - define variable for awk
value=$value - value is a variable name which holds the value of $value. For...
2,435
Posted By itkamaraj
#!/bin/bash count_C=$(grep -c C mols) ...
#!/bin/bash
count_C=$(grep -c C mols)
count_H=$(grep -c H mols)
count_O=$(grep -c O mols)
value="${count_C} ${count_O} ${count_H}"
awk -v value="$value" 'NR==7{$0=$0" "value}1' input
Showing results 1 to 2 of 2

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