Search Results

Search: Posts Made By: phone_book
2,070
Posted By phone_book
shell scripting error
i am trying to work on a simple shell script as

#!/bin/bash
filename = $2
if [ "$1" = "-cat" ]; then
echo " Displaying the Content of the file:"
filename = $2
cat filename
else
if [ "$1" =...
1,946
Posted By phone_book
explaining awk
i am new to awk scripting. i couldn't figure out how this awk script works can anyone explain?

#!/bin/awk -f
{
for( x=1; x<=NF; ++x) {
if( x == 3 ) {
continue
...
2,073
Posted By phone_book
ya it worked fine..thank you guys
ya it worked fine..thank you guys
2,073
Posted By phone_book
arithmatic with awk
hi, i am trying some awk arthmatic calculation,i have a problem if any one can help
let say if i have a file
exm.txt
3 + 2
3 * 2
3 / 2
3 - 2

the output expected is
awk -f exm.awk exm.txt
3...
22,183
Posted By phone_book
ya it works fine..thank u guys for the quick...
ya it works fine..thank u guys for the quick response.
22,183
Posted By phone_book
i still have one question....i know both of them...
i still have one question....i know both of them works...thanks a lot for that...
but is it possible to run using
awk -f filename.awk filename.txt

just curious...
thank you
22,183
Posted By phone_book
awk sum columns
can anyone help me how do i add the colums using awk seperated by character @. for eg i have

3@4
2@9
5@1

the result should be

10 14

i tried using
{ sum+= $1 }
END { print sum }...
1,693
Posted By phone_book
thank u ..it helps a lot
thank u ..it helps a lot
1,618
Posted By phone_book
how do i use this sed command
can anybody help me what these command do...i couldnt figure it out

#! /bin/sed -nf
H
$ {
x
s/\n//g
p
}
and what abt this one
sed '/./,$!d'

thank you in advance.
1,693
Posted By phone_book
sed command help
can anyone please help me what these sed commands do and how they work
#! /bin/sed -nf

H
$ {
x
s/\n//g
p
}and sed '/./,$!d' thank you
Showing results 1 to 10 of 10

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