Search Results

Search: Posts Made By: santosh1234
2,071
Posted By santosh1234
grep command usage
what is the grep command to get the second occurence of pattern in a file
or how to do with sed ?
1,558
Posted By santosh1234
there is som mistake in above thread the...
there is som mistake in above thread

the right question is
awk '/far/,/$var1/' a.txt
i would like to know whats wrong in it
1,558
Posted By santosh1234
help needed in awk
Hi ,
i have a file a.txt like this:
far
near
veryfar
toonear

typeset var1=veryfar
to extract the text between two strings i use the following command :

awk '/far/,$veryfar/' a.txt

its...
1,636
Posted By santosh1234
thanks a lot
thanks a lot
1,636
Posted By santosh1234
can any one explain the meaning of the below code ?
while getopts :g:l:h: KEY $*
do
case $KEY
in
g) NAME=$OPTARG ;;
l) LAB=$OPTARG ;;
h) HD=$OPTARG ;;
*) echo "Illegal option: $OPTARG"
echo "$usage"...
5,449
Posted By santosh1234
exec command
can any one pls explain the meaning of
exec 1<&5 ?? its urgent
1,761
Posted By santosh1234
AWK - HELP pls explain this ?
echo "23.54" | awk '
function round(A) {
return int( A + 0.5 )
}
{
printf("%d\n",round($1));
}'> > > > > >
awk: syntax error near line 2
awk: bailing out near line 2
3,107
Posted By santosh1234
explain Xargs ?
hi all ,
i am using the following command :
find . -type f | xargs grep <pattern>
can u explain me what is the importance of xargs here ?
3,447
Posted By santosh1234
using below code
for i in `cat <first_string_used_file>`
do
sed -n '/$i/,/fi/' <input_file> >> lbl_file
done
3,447
Posted By santosh1234
recursively delete the text between 2 strings from a file
i have 200000bytes size of a unix file i need to delete some text between two strings recursively using a loop with sed or awk . these two strings are : 1st string getting from a file :::2 nd string...
1,883
Posted By santosh1234
whats wrong in this pls help how to take $i value ?
for i in `cat rgu`
do
echo $i
sed -e '/LABEL=$i/,/fi/d' g_scripts > g_scripts2
cat g_scripts2 > g_scripts
done
4,658
Posted By santosh1234
how to use multiple files in sed with w command
i have a command like :
sed -n 's/^[0-9]*[02468] /&/w even' <file
if i want to write to multiple files like
sed -n 's/^[0-9]*[02468] /&/w zero two three' < file
its not working it is taking...
5,726
Posted By santosh1234
thanks a lot your sed command is working , and i...
thanks a lot your sed command is working , and i think awk has some problem
5,726
Posted By santosh1234
how to do awk using for loop
i have a command in awk for getting the text between two strings:
awk '/<string1>/,/<string2>/' <input_filename>
now i want to use this command in for loop like:
for i in ` cat file `
do
awk...
5,920
Posted By santosh1234
can u explain the meaning of each line , because...
can u explain the meaning of each line , because i dont know perl
5,920
Posted By santosh1234
using AWK how to extract text between two same strings
I have a file like: myfile.txt
it is easy to learn awk and begin awk scripting
and awk has got many features
awk is a powerful text processing tool

Now i want to get the text between first awk...
Showing results 1 to 16 of 16

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