I am having a file with thousands of columns. I would like to find the difference between adjacent columns (ie $i and $(i+1)) and perform the following action:
if the difference is less than -10, then i need to print "-2";
if the difference is between 0 and <-9, then i need to print "-1";
if the difference is between 0 and < 9, then i need to print "1"; and
if the difference is more than 10, then i need to print "2".
for this i have tried the following code, but its now working and giving me the syntax error at else position. Here is the code
Can anyone help me to sort out this problem?
Expecting your reply and thanks in advance.
Regards
Fredrick.
---------- Post updated at 03:23 PM ---------- Previous update was at 02:35 PM ----------
Sorry, there was a typo error. It should be like this:
Hi guys ...
i need ur help with some printing problem in unix ...
first prob. :
i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) .
My issue , is it possible to print directly to an Ip address from unix ?
How do i make it work to get any results ?... (3 Replies)
Hi
Can anybody tell what are the great differences in Solaris 2.5 and 9? I am seeking information like differences in libraries, User Interface, Configuraion files, daemons, Packaging and archiving tools, Hardware supported etc.
Please help me, as this is little urgent. Even if you can refer... (4 Replies)
I have a file that contains
/home
/opt
/stand
/var
/usr
/tmp
/opt
/home
I need to print the lines that are unique so the output would be
/stand
/var
/usr
/tmp
and omit any filesystems that are duplicates. I searched the forums but did not find anything, although i searched on... (3 Replies)
What is the differene between sh and ksh,
if i want to write function
count() {
ls | wc -l
}
How to use in both shell means
how to run this function in both the shell.
correct me if my question is wrong (2 Replies)
Hi
Hope you are having a great weeknd !! I had a question and need your expertise for this :
I have 2 files File1 & File2(of same structure) which I need to compare on some columns. I need to find the values which are there in File2 but not in File 1 and put the Differences in another file... (5 Replies)
We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Hi,
We have a Unix 3.2v5.0.5.
I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts).
This is the configuration file :
Code:
root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)