Sponsored Content
Full Discussion: Challenging scenario
Top Forums Shell Programming and Scripting Challenging scenario Post 302582719 by pandeesh on Saturday 17th of December 2011 01:28:45 PM
Old 12-17-2011
Quote:
Originally Posted by bartus11
Shouldn't output be:
Code:
1,10
2,10
3,6
4,10
9,10

?
Yes.You are correct. That's 4,10.

---------- Post updated at 11:58 PM ---------- Previous update was at 11:56 PM ----------

Quote:
Originally Posted by balajesuri
@pandeesh: How do you arrive at output from input? What's the logic?
You need t chain through the input.
For example, take the first record
Code:
1--->2--->4-->9---->10

So the output will be 1,10.

I hope you get it.

thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Very Challenging Question! Need help bad!

I am in desperate need of an answer to this question. I have looked everywhere (even the man pages) and found very little. Solaris has the concept of "plumbing" a network interface. What does this mean? I would be really greatful to whoever could help me answer this question. I am so... (1 Reply)
Discussion started by: Sparticus007
1 Replies

2. UNIX for Dummies Questions & Answers

A Challenging situation for the MODERATORS

Well, I hope this way you will respond to my inquiries. I have 4 unix servers,with static ips (though i dont think this is an issue)....i can telnet and rlogin from one to the other....if i FTP from on et othe other and try to execute : cd /user return /user : no such file or... (1 Reply)
Discussion started by: BAM
1 Replies

3. Shell Programming and Scripting

Challenging!! Help needed

Hi, I have a script xyz.ksh which accpets two parameters the format of first one is :X_TABLENAME_Y and second one is a digit. I can extract a table name from that parameter and store it in a variable var_tblnm, so if i pass a parameter X_TABLE1_Y the value in var_tblenm is "TABLE1" now i have... (1 Reply)
Discussion started by: hcdiss
1 Replies

4. Programming

A challenging problem involving symbolic links.

Hello, I'm working on an application that bridges together several applications involved in creating a video workflow for editing with digital cinema cameras. The main platform is MacOSX. Because of the nature of some of the utilities for working with this video footage I must spoof filenames... (2 Replies)
Discussion started by: ibloom
2 Replies

5. Shell Programming and Scripting

Very Challenging Problem. Please read fully.

Hi, This is the Third thread i'm putting here for the same problem. :( Actually, i'm trying a script like this.. but its taking a long time.. about 3 days to complete fully.. #!/bin/ksh if then exit 1 fi while read i do while read j do field7=`echo $j|cut -d "|"... (12 Replies)
Discussion started by: RRVARMA
12 Replies

6. Shell Programming and Scripting

Need help with this challenging code....

Hello All, I am new to this forum, and the reason I came here is to seek solution from the experts. I have written following wrapper script, it was running fine from past couple of months, until last week. When one of the function in the script which suppose to login through ssh to the... (2 Replies)
Discussion started by: tajdar
2 Replies

7. UNIX for Advanced & Expert Users

Very Challenging :Copy files in Multiple Threads

Hello all, I asked this in the basic Unix forum got no answer since one week. So I believe this is an advanced level question hence posting it here. Any suggestions welcome. I have a directory of files of varying sizes. I want to copy all these files in n number of threads to... (2 Replies)
Discussion started by: samoo
2 Replies

8. Shell Programming and Scripting

Challenging Awk array problem

Hi, I rather have a very complicated awk problem here, at least to me. I have two files. File 1: 607 687 174 0 0 chr1 3000001 3000156 -194195276 - L1_Mur2 LINE L1 -4310 1567 1413 1 607 917 214 114 45 chr1 3000237 ... (19 Replies)
Discussion started by: polsum
19 Replies

9. Shell Programming and Scripting

simple but challenging ignore case

Folks - I found this code on the forums to extract a paragraph for a matching pattern but I don't know how to make it ignore case. grep "-ip" is not an option for me as I am on SUSE LINUX. Thanks for ur help. I run this script as below: grep_para.ksh sqlstate < logfile "The end result... (2 Replies)
Discussion started by: beowulfkid
2 Replies

10. Emergency UNIX and Linux Support

Help in below scenario

Hi, my file has the data like below: 11,231,ABCVAV 22,AAHJHAj22,hdsjkhdls 22,dhskjhdkshd 22,gdgkdkadh 11,232,dgsjgdjh 22,ghdskahdkja 22,shdkajshs 11,233,ddjs 22,dhjkahkd 22,hsajhaah 11,231,sjkjsjj 22,ahkh 22,hsakh From the above i need only the records which starts as 11,231... (5 Replies)
Discussion started by: pandeesh
5 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 10:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy