Search Results

Search: Posts Made By: duckeggs01
2,769
Posted By Franklin52
To get the name of the directory you can do...
To get the name of the directory you can do something like:
file=$(find . -name <filename>)
dir=${file%/*}
6,417
Posted By agama
Simple example using bartus11's awk: ...
Simple example using bartus11's awk:


printf "enter value: "
read answer
nawk -v target="$answer" '{ for( i=1; i<=NF; i++ ) if( $i == target ) print; }' file


EDIT:
Crossed posts -- if you...
6,417
Posted By bartus11
echo "enter val " read answer awk -vx=$answer...
echo "enter val "
read answer
awk -vx=$answer '{for (i=1;i<=NF;i++) if ($i==x) print}' file
Showing results 1 to 3 of 3

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