Sponsored Content
Top Forums Shell Programming and Scripting Unable to print block of data Post 302884645 by cskumar on Wednesday 22nd of January 2014 12:11:46 PM
Old 01-22-2014
No impact with the Done statement

Hi Akshay,

I don't see any issue in the extra done statement and getting the same error.

regards,
Kumar.

---------- Post updated 01-22-14 at 04:55 AM ---------- Previous update was 01-21-14 at 08:32 AM ----------

Hi, Can anyone have a look at it and help me..Your immediate help will be appreciated.

Regards,
Kumar.

---------- Post updated at 12:11 PM ---------- Previous update was at 04:55 AM ----------

Hi All,

After the long struggle I got to know that the unexpected error is due to the bash version..

I have refer the old post and got the answer.

Looping through arrays | Unix Linux Forums | Shell Programming and Scripting

My next blocker is how to define the arrays using any delimiters..Kindly mind that the values are dynamic..
In the below example the space is the delimiter and I need the loop to run 4 times..But it is not working..Any clue will be highly appreciated.

Code:
VAR="5|EOF 89|840 45|454 45|454"
echo "***********VAR**********----${#VAR[*]}----"

cnt=0
while [ $cnt -lt ${#VAR[*]} ]
do
echo "$cnt--${VAR[$cnt]}"
      cnt=$(( $cnt + 1 ))
done

Code:
Output
0--5|EOF 89|840 45|454 45|454

 

10 More Discussions You Might Find Interesting

1. SCO

Non-Root Users Unable to Print

UnixWare 7, Release 7.1.3 We have a customer that has frequent issues with Non-Root users being unable to print. They are able to print w/o issues, but all of the sudden it stops working. The only workaround we have at this point is to reboot the server. It is happening weekly according to... (1 Reply)
Discussion started by: cfshd
1 Replies

2. AIX

Unable to print Cyrillic fonts

Hi All I confifured HP 4250 printer on AIX server..I am unable to print cyrillic fonts prints. Please assist.. (0 Replies)
Discussion started by: kandatihari
0 Replies

3. Shell Programming and Scripting

Unable to set a data to array

Hi All, Iam trying to set the value to the array... Still its not happening Following is the code: #!/usr/bin/ksh filenames="x"; filenames="y"; echo $filenames; echo $filenames; O/P: x x Iam expecting (2 Replies)
Discussion started by: kiranlalka
2 Replies

4. Solaris

NIS slave unable to copy the data bases

Hi, I'm learning for my Solaris 10 sys-admin part 2. I'm now trying to get nis working because for the exercise. I run in to a problem. Setup: Three Systems solaris101 (client) Nothing wrong here havent made any config changes yet. solaris102 (master server) Interfaces ... (1 Reply)
Discussion started by: jld
1 Replies

5. Programming

Unable to publish data

Hi All, In my application, we are using Publish/subscribe model implemented in JAVA and when I implemented it on windows to windows os,it is working fine and able to publish the right data and even when I am trying the same between two different OS i.e between Windows and Solaris sparc or... (1 Reply)
Discussion started by: smartgupta
1 Replies

6. Shell Programming and Scripting

FNR>2 is not working and unable to extract data from a file

Hi, I have a file in windows environment and moved to UNIX through FTP (ASCII format). The file is having with tab delimited file. awk ‘FNR>2' file_cust*.txt >>filnal.txt I have the same file in production; it is working fine with the same procedure. Once we receive the file in windows... (1 Reply)
Discussion started by: onesuri
1 Replies

7. Shell Programming and Scripting

Unable to Print Count

Hi All, I am performing addition of two inetger variables which assigning output to a new variable getting following error. Check1.sh #!/bin/ksh filesrc=/usr/kk/Source1.txt filetgt=/usr/kk/Source2.txt FINAL_COUNTS= `awk '{n++} END {printf "%012d\n",n}' ${filesrc} ${filetgt}`... (3 Replies)
Discussion started by: kmsekhar
3 Replies

8. Shell Programming and Scripting

Unable to print dynamic arguments in for loop

Hi All, I want to pass few dynamic arguments to shell script. The number of arguments differ each time I call the script. I want to print the arguments using the for loop as below. But not working out. for (( i=1; i<=$#; i++ )) do echo $"($i)" done /bin/sh test.sh arg1 arg2 arg3 ... (1 Reply)
Discussion started by: laalesh
1 Replies

9. Shell Programming and Scripting

Unable to retrieve data from shell when connected to Oracle

I am trying to get the data from oracle table to a variable I have tried the below code #/usr/bin/sh echo " I am in correct loop" SPOOL_FILE=/app/scripts/alt.lst sqlplus /nolog <<END_SQL connect bindu/bindu@gis whenever sqlerror exit failure rollback;... (4 Replies)
Discussion started by: Kiransagar
4 Replies

10. Shell Programming and Scripting

Unable to print python array in shell script loop.

I am unable to loop print a python string array in my unix shell script: ~/readarr.sh '{{ myarr }}' more readarr.sh echo "Parameter 1:"$1 MYARRAY= $1 IFS= MYARRAY=`python <<< "print ' '.join($MYARRAY)"` for a in "$MYARRAY"; do echo "Printing Array: $a" done Can you... (10 Replies)
Discussion started by: mohtashims
10 Replies
bup-margin(1)						      General Commands Manual						     bup-margin(1)

NAME
bup-margin - figure out your deduplication safety margin SYNOPSIS
bup margin [options...] DESCRIPTION
bup margin iterates through all objects in your bup repository, calculating the largest number of prefix bits shared between any two entries. This number, n, identifies the longest subset of SHA-1 you could use and still encounter a collision between your object ids. For example, one system that was tested had a collection of 11 million objects (70 GB), and bup margin returned 45. That means a 46-bit hash would be sufficient to avoid all collisions among that set of objects; each object in that repository could be uniquely identified by its first 46 bits. The number of bits needed seems to increase by about 1 or 2 for every doubling of the number of objects. Since SHA-1 hashes have 160 bits, that leaves 115 bits of margin. Of course, because SHA-1 hashes are essentially random, it's theoretically possible to use many more bits with far fewer objects. If you're paranoid about the possibility of SHA-1 collisions, you can monitor your repository by running bup margin occasionally to see if you're getting dangerously close to 160 bits. OPTIONS
--predict Guess the offset into each index file where a particular object will appear, and report the maximum deviation of the correct answer from the guess. This is potentially useful for tuning an interpolation search algorithm. --ignore-midx don't use .midx files, use only .idx files. This is only really useful when used with --predict. EXAMPLE
$ bup margin Reading indexes: 100.00% (1612581/1612581), done. 40 40 matching prefix bits 1.94 bits per doubling 120 bits (61.86 doublings) remaining 4.19338e+18 times larger is possible Everyone on earth could have 625878182 data sets like yours, all in one repository, and we would expect 1 object collision. $ bup margin --predict PackIdxList: using 1 index. Reading indexes: 100.00% (1612581/1612581), done. 915 of 1612581 (0.057%) SEE ALSO
bup-midx(1), bup-save(1) BUP
Part of the bup(1) suite. AUTHORS
Avery Pennarun <apenwarr@gmail.com>. Bup unknown- bup-margin(1)
All times are GMT -4. The time now is 01:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy