Search Results

Search: Posts Made By: web2moha
2,513
Posted By web2moha
Thank you Chubler for the help.
Thank you Chubler for the help.
2,513
Posted By web2moha
When i run a system specific command, i get the...
When i run a system specific command, i get the input which is attached. I add


<system command> | sed '1,2d' | sed '$d' | awk -F" " '{ if (NF == 6) print $1, $2, $3, $4, $5, $6; if (NF == 5)...
2,513
Posted By web2moha
How to merge fields in a single file using awk ?
Hi,

From a file, using:

awk -F" " '{ if (NF == 6) print $1, $2, $3, $4, $5, $6; if (NF == 5) print $1, $2, $3, $4, $5; }'

i printed out the required output. But i'm trying to merge the...
5,523
Posted By web2moha
Help: Sorting the numbers without using sort command
Hi,
I've got two arrays

1 3 5 7
2 4 6 8

and i need to write a shell script to get the output 1 2 3 4 5 6 7 8 without using sort or bubble sort.
834
Posted By web2moha
Sorting
Hi,
I've got two arrays

1 3 5 7
2 4 6 8

and i need to write a shell script to get the output 1 2 3 4 5 6 7 8 without using sort or bubble sort.
2,037
Posted By web2moha
Hi Akshay. your code, worked. Thanks a ton.
Hi Akshay.

your code, worked.
Thanks a ton.
2,037
Posted By web2moha
Exiting the script if the character is not recognized
Below is the script that i'm using but i'm getting an error,
echo -n "Read the letter >(enter a or b or c) "
read letter

if [ $letter -ne a ] || [ $letter -ne b ] || [ $letter -ne c ];
then
...
2,692
Posted By web2moha
symcfg -sid 403 list -thin -pool -gb ...
symcfg -sid 403 list -thin -pool -gb >>>>>>>>>. this kind of output goes to a file

Symmetrix ID: 000008657403

S Y M M E T R I X P O O L S ...
2,692
Posted By web2moha
Redirecting the output
For example,
if we run the below command,
symcfg list -thin -pool , results in an output most of the times and if the out is generated i'm able to redirect the output to a file. but sometimes it...
1,307
Posted By web2moha
Thanks Yoda, that worked. Appreciated.
Thanks Yoda, that worked. Appreciated.
1,307
Posted By web2moha
awk '{sum += $1} END{print sum}' filename but...
awk '{sum += $1} END{print sum}' filename
but i'm not sure how to print rest of the columns, it gives the output of only first column
1,307
Posted By web2moha
Script to add columns
I want to add all the columns in the file below
1 4 5 6
2 7 8 9
6 7 9 5

Output:
1+2+6 4+7+7 5+8+9 6+9+5

Any suggestions will be appreciated. Thank you
6,902
Posted By web2moha
Thanks
Thank you for the swift reply:b:
6,902
Posted By web2moha
How to match the first word and print only that line in UNIX?
Below is the file

DISK-A 109063.2 49 31 40.79
DISK-B 110058.5 49 44 57.07
DISK-c 4402.4 2 1 2.14

from the file, i want to search for 'DISK-A' and print only that line...
Showing results 1 to 14 of 14

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