Sponsored Content
Full Discussion: Storing a variable?
Top Forums Shell Programming and Scripting Storing a variable? Post 302161890 by hoover90 on Saturday 26th of January 2008 08:39:58 PM
Old 01-26-2008
You guessed right! It works!

Thank you!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Storing the output into a variable

Hi unix gurus, I am trying to store the result of a command into a variable. But it is not getting stored. x='hello' y=echo $x | wc -c but it is giving the output as 0(zero) Pls help me its very urgent (7 Replies)
Discussion started by: ravi raj kumar
7 Replies

2. Shell Programming and Scripting

storing a command in a variable

how would i go about storing this command in a variable echo "$LINE" | awk -F"|" '{print $1"|"$2"|"$3"}' i have tried FOO = ${command up there} but receive the error FOO: not found aswell as a couple of other attempt but no luck (2 Replies)
Discussion started by: nookie
2 Replies

3. Shell Programming and Scripting

Storing value in a variable

Hi Everyone, I have a code which requires to be stored in different variables and I am achiving it like this. HOST=`echo $RMP | cut -f2 -d:` NAME=`echo $RMP | cut -f3 -d:` DIR=`echo $RMP | cut -f4 -d:` TYPE=`echo $RMP | cut -f5 -d:` Is there any other way of storing value... (2 Replies)
Discussion started by: gehlnar
2 Replies

4. Shell Programming and Scripting

About storing the value of wc -l into a variable and then using this value in while

Hi all, I m new to this forum. I ma facing onei issue. I have something like this: length= wc -l < b2| awk '{print $1}' where b2 is filename having detauls like: cat b2 abc1 abc4 xyc3 sbdghf4 but when I do echo "$length" it displays nothing Also I am using awk to overcome... (4 Replies)
Discussion started by: student2009
4 Replies

5. Shell Programming and Scripting

Problem in storing value to variable

#bash curVer=`cat /var/sadm/clsversion | cut -f 2 -d "_"` echo "CurVer:$curVer" ls |grep -v tar| grep -v sh| grep -v log|cut -f 1 -d "_" | sort -u >tmp1 for line in $(cat tmp1) do ver=`echo $line_$curVer` ls $line* |sort >tmp2 grep -n ${ver} tmp2 >/dev/null ... (2 Replies)
Discussion started by: rajamohan
2 Replies

6. Shell Programming and Scripting

Storing o/p of a command to a variable

Hi, I have a ftp script there I want to store the o/p of the below command: sftp -b <batch file> user@password cat <batch file> get /remote/file/path/remote_file_name.csv*.gz /local/path Now the problem is that when I fire this command. Then it gives o/p as: File... (7 Replies)
Discussion started by: dips_ag
7 Replies

7. UNIX for Dummies Questions & Answers

Storing all the PID's in a variable.

Hi, ps -ef|awk '{print $2}' i want to store the result of the above command in a variable. I never worked with arrays in shell scripting. i tried the below code: set a=`ps -ef|awk '{print $2}'` But echo $a returns null. I want to store the content in a variable and retrieve it... (2 Replies)
Discussion started by: pandeesh
2 Replies

8. Shell Programming and Scripting

Storing output into a variable

My script below seems to be choking because I need the the output of the find command to be stored as a variable that can then be called by used lower in the script. #!/bin/bash cd "/resumes_to_be_completed" var1=find . -mmin -1 -type f \( -name "*.doc" -o -name "*.docx" \)... (1 Reply)
Discussion started by: binary-ninja
1 Replies

9. Shell Programming and Scripting

Storing a variable using sed

I would like to use sed to store a variable. The code is : echo $HEADERREC CUTVAR=$(echo "$HEADERREC"|sed 's/SDV/STR') echo $CUTVAR Output I am getting now: 0012PVGRSCDVSDV 005 00000000000000000000 2014 0.00 sed: Function s/SDV/STR cannot be parsed. Desired... (5 Replies)
Discussion started by: MIA651
5 Replies

10. UNIX for Advanced & Expert Users

Passing variable as input & storing output in other variable

I have a below syntax its working fine... var12=$(ps -ef | grep apache | awk '{print $2,$4}') Im getting expected output as below: printf "%b\n" "${VAR12}" dell 123 dell 456 dell 457 Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
RAW2TIFF(1)						      General Commands Manual						       RAW2TIFF(1)

NAME
raw2tiff - create a TIFF file from a raw data SYNOPSIS
raw2tiff [ options ] input.raw output.tif DESCRIPTION
raw2tiff converts a raw byte sequence into TIFF. By default, the TIFF image is created with data samples packed (PlanarConfiguration=1), compressed with the PackBits algorithm (Compression=32773), and with each strip no more than 8 kilobytes. These characteristics can over- ridden, or explicitly specified with the options described below. OPTIONS
-H number size of input image file header in bytes (0 by default). This amount of data just will be skipped from the start of file while read- ing. -w number width of input image in pixels (can be guessed, see GUESSING THE IMAGE GEOMETRY below). -l number length of input image in lines (can be guessed, see GUESSING THE IMAGE GEOMETRY below). -b number number of bands in input image (1 by default). -d data_type type of samples in input image, where data_type may be: byte 8-bit unsigned integer (default), short 16-bit unsigned integer, long 32-bit unsigned integer, sbyte 8-bit signed integer, sshort 16-bit signed integer, slong 32-bit signed integer, float 32-bit IEEE floating point, double 64-bit IEEE floating point. -i config type of samples interleaving in input image, where config may be: pixel pixel interleaved data (default), band band interleaved data. -p photo photometric interpretation (color space) of the input image, where photo may be: miniswhite white color represented with 0 value, minisblack black color represented with 0 value (default), rgb image has RGB color model, cmyk image has CMYK (separated) color model, ycbcr image has YCbCr color model, cielab image has CIE L*a*b color model, icclab image has ICC L*a*b color model, itulab image has ITU L*a*b color model. -s swap bytes fetched from the input file. -L input data has LSB2MSB bit order (default). -M input data has MSB2LSB bit order. -c Specify a compression scheme to use when writing image data: -c none for no compression, -c packbits for the PackBits compression algorithm (the default), -c jpeg for the baseline JPEG compression algorithm, -c zip for the Deflate compression algorithm, and -c lzw for Lempel-Ziv & Welch. -r number Write data with a specified number of rows per strip; by default the number of rows/strip is selected so that each strip is approxi- mately 8 kilobytes. GUESSING THE IMAGE GEOMETRY
raw2tiff can guess image width and height in case one or both of these parameters are not specified. If you omit one of those parameters, the complementary one will be calculated based on the file size (taking into account header size, number of bands and data type). If you omit both parameters, the statistical approach will be used. Utility will compute correlation coefficient between two lines at the image center using several appropriate line sizes and the highest absolute value of the coefficient will indicate the right line size. That is why you should be cautious with the very large images, because guessing process may take a while (depending on your system performance). Of course, the utility can't guess the header size, number of bands and data type, so it should be specified manually. If you don't know any- thing about your image, just try with the several combinations of those options. There is no magic, it is just a mathematical statistics, so it can be wrong in some cases. But for most ordinary images guessing method will work fine. SEE ALSO
pal2rgb(1), tiffinfo(1), tiffcp(1), tiffmedian(1), libtiff(3) Libtiff library home page: http://www.remotesensing.org/libtiff/ libtiff November 2, 2005 RAW2TIFF(1)
All times are GMT -4. The time now is 08:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy