Sponsored Content
Top Forums Shell Programming and Scripting Divide the file into several Variable Post 302413217 by amaulana on Thursday 15th of April 2010 02:59:02 AM
Old 04-15-2010
Divide the file into several Variable

I have a file, let's say X
Code:
BTS 0          UNLOCKED         ENABLED         NONE
TRX 0          UNLOCKED         ENABLED         NONE
TRX 1          UNLOCKED         ENABLED         NONE
BTS 1          UNLOCKED         ENABLED         NONE
TRX 0          UNLOCKED         ENABLED         NONE
TRX 1          UNLOCKED         ENABLED         NONE
BTS 2          UNLOCKED         ENABLED         NONE
TRX 0          UNLOCKED         ENABLED         NONE
TRX 1          UNLOCKED         ENABLED         NONE

I want to devide the file into several variables based on the number of BTS, there's 3 BTSes here, so i need three variable.

Variable ONE contains:
Code:
BTS 0          UNLOCKED         ENABLED         NONE
TRX 0          UNLOCKED         ENABLED         NONE
TRX 1          UNLOCKED         ENABLED         NONE

Variable TWO contains:
Code:
BTS 1          UNLOCKED         ENABLED         NONE
 TRX 0          UNLOCKED         ENABLED         NONE
 TRX 1          UNLOCKED         ENABLED         NONE

Variable THREE contains:
Code:
BTS 2          UNLOCKED         ENABLED         NONE
 TRX 0          UNLOCKED         ENABLED         NONE
 TRX 1          UNLOCKED         ENABLED         NONE

I need your help guys... Smilie

Last edited by zaxxon; 04-15-2010 at 07:54 AM.. Reason: use code tags please, ty
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script needs to divide by 2

i need to divide this count by 2, what variable can i use in my script? 26 hcscprod_cpus_totals /2 = 13 13 hcncprod_cpus_totals /2= 6.5 541 ktazp_cpus_totals /2= 270.5 346 ktazd_cpus_totals /2=173 110 ktazi_cpus_totals /2=55 10 ktazq_cpus_totals /2=5 (2 Replies)
Discussion started by: wereyou
2 Replies

2. Shell Programming and Scripting

how to divide single large log file into multiple files.

Can you please help me with writing script for following purpose. I have to divide single large web access log file into multiple log files based on dates inside the log file. For example: if data is logged in the access file for jan-10-08 , jan-11-08 , Jan-12-08 then make small log file... (1 Reply)
Discussion started by: kamleshm
1 Replies

3. Shell Programming and Scripting

divide a single file with different Weboffercodes into different files with each of o

Here is the format of my file; I do not have the delimiter in the file for the data to be separated. Each line in the file is in the following format. File contains the data of different WebOfferCodes Item Code | Account Number | Card Number | Source code | WebOfferCode 12digits | 10... (4 Replies)
Discussion started by: enigma_83
4 Replies

4. UNIX for Dummies Questions & Answers

divide the file into multiple files based on the city name

Hi, I have a file abc.dat. It contains the fileds of empid, empname, empcity. each city contains 10 records. i want to create the city file and pass the same city records into the file. I don't know the city names. In unix using awk command how can we do? abc.dat: 1 john delhi 2... (2 Replies)
Discussion started by: raghukreddy.ab
2 Replies

5. Shell Programming and Scripting

Divide variable

Hi All, here D Prints the bytes value .plz help to convert the variable D value to MB in new variable $E D=`more $C |awk '{print $6;}'` Thanks in Advance.:) (3 Replies)
Discussion started by: netdbaind
3 Replies

6. Shell Programming and Scripting

Divide two variable

F= `expr $E/$S` output test5.sh: line 45: 1296863.27001857757568359375/21997: No such file or directory can any one help me ,i just want to divide the $E/$S and Print o/p in F. (3 Replies)
Discussion started by: netdbaind
3 Replies

7. Shell Programming and Scripting

Divide number of lines by the size of the same file. And create relational table.

I basically need to do what the title says. I have my text file. I'm still pretty new at this. At the moment I know that: 1. wc -l file.txt To get the number of lines. 2. ls -lh file.txt To get the file size. But I need to divide both numbers. Then I need to save the output in a... (7 Replies)
Discussion started by: PainMaker101
7 Replies

8. UNIX for Dummies Questions & Answers

Divide a numerical data column by a variable

Hello, I have two files, f1 and f2. f1 has 5 columns like so: a b c d 154 e f g h 365 ..... f2 has two columns, the first column contains the name of the above file and second column contains a constant which is to be used for division. e.g. file1 56 I want to divide the 5th... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

9. UNIX for Dummies Questions & Answers

To divide file

We have large log files, and we need to extract last four hours lines only, Please let us know the command. Thanks, Saurau. (1 Reply)
Discussion started by: saurau
1 Replies

10. Shell Programming and Scripting

Divide the numbers in file

Dear ALL, I have sample file : tx_bytes: 2422, tx_packets: 13, uptime: 16119, tx_bytes: 2342, tx_packets: 14, uptime: 11009, tx_bytes: 252, tx_packets: 12, uptime: 3113, my formula : minutes=$(( uptime/60%60 )) hours=$(( uptime/60/60%24 )) (3 Replies)
Discussion started by: gnulyn
3 Replies
JIGL(1) 						      General Commands Manual							   JIGL(1)

NAME
jigl - Generates a static html photo gallery from one or more directories of images SYNOPSIS
jigl [ options ] [ directory ] [ directory ... ] DESCRIPTION
jigl (pronounced jiggle) is a perl script that generates a static html photo gallery from one or more directories of gif/jpg/png images. It supports themes and is very customizable. It includes the ability to display comments and EXIF info for each image in a simple clean lay- out. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For further details, see the documentation in /usr/share/doc/jigl/ -h, --help Show summary of options. -v, --version Show version of program. -cg --create-gallerydat Create a gallery.dat file and exit -uec --use-exif-comment Use the comment field in the exif header (if it exists) as the slide comment. This will overwrite the description that is written in a gallery.dat file. If used in conjunction with the -cg option, the comment field will be saved in the gallery.dat file. Default is DISABLED. (can be negated). -rs --replace-spaces <a|y|n> Replaces spaces with underscores "_" in filenames. a -- (default) Ask the user if they want to y -- replace and do no ask n -- do not replace and do no ask -it --index-title <string> Sets the title and title-bar of the index.html page to string. This is meant to be used when you are not using a gallery.dat file. -iw --index-width <1-255> How many thumbnails per line you want on the index page. Default is 5 -ir --index-row <0-255> The number of thumbnail rows you want on the index page before a new index page is generated. If 0, there is no limit and only one index page will be generated. Default is 0 -ut --update-templates Remove the template files from the local directory and the global default theme directory. This will cause new default template files to be generated in the global default theme directory. Default is DISABLED. (can be negated). -ft --force-thumb Force thumbnail regeneration (can be negated) -fs --force-slide Force slide regeneration (can be negated) -skb --slide-kbsize Print the file size of the slide on the index page under the thumbnails. Default is ENABLED (can be negated) -sxy --slide-xysize Print the slide dimensions under the thumbnails on the index page. Default is ENABLED (can be negated) -uo --use-original Use the original images for the slides - do not generate a scaled slide image. Default is DISABLED. (can be negated) -lo --link-original Link to the original images from the slides. Default is DISABLED. (can be negated). -aro --auto-rotate-originals Do a lossless rotation of the original images. This option is only useful if your digital camera sets the Orientation field in the EXIF header. All EXIF header information will be kept and the Orientation field will be updated to reflect the rotation. Default is DISABLED. (can be negated). -gs --generate-slides Gererate slide pages and link them to the thumbnails. If this option is turned off, slides will not be generated and the info pages will be linked to the thumbnails instead. If neither slide or info pages are generated, the thumbnails will not link to anything. Default is ENABLED. (can be negated). -gi --generate-info Generate info pages and link them to the "info" link on the slide pages. If this option is turned off, info pages will not be gener- ated and the "info" link on the slide pages will dissapear. If no slides are generated, then the info pages will be linked directly to the thumbnails. Default is ENABLED. (can be negated). -sy --slideY <int> Maximum size of slide image in the Y direction. If the height of the original image is greater than this value the slide will be scaled to this value. Otherwise the slide is simply a copy of the original. Default is 480 pixels -ty --thumbY <int> Size of the scaled thumbnail image in the Y direction Default is 75 pixels -iy --infoY <int> Maximum size of the info image in the Y direction. This is simply a scale of the slide image using HTML height and width tags. A new image is not generated. Default is 240 pixels -ws --watermark-slides Enable watermarking of the slide images. A watermark file must be present for this option to work. Default is DISABLED. (can be negated). -wf --watermark-file <filename> Name of the watermark file to use when -ws is enabled. Default is "watermark.png". -wg --watermark-gravity <north|south|east|west|northeast|northwest|southeast|southwest> Where to display the watermark on the slide. Default is southeast. -gb --go-back Prepend a "Go Back" link to the header in the index.html file. If used in conjunction with -cg, the Go Back link will be added to the INDEX-HEADER tag in the newly created gallery.dat file. Default is DISABLED. (can be negated). -gbs --go-back-string <string> String to use for the go-back-url link. You could even make this an image to help round out a theme by making this string something like: "<img src=theme/myimage.gif border=0>" Default is "Go Back". -gburl --go-back-url <url> URL to use when -gb is enabled. Any URL can be used. Default is '..', the previous directory. --theme <themeName> Name of theme to use. Themes files are defined as "themeName.theme". You would just enter the "themeName" portion of the file. Default is "default". -wd --web-dir <dir> Directory to put all the gallery files (html, slides, thumbnails and possibly theme files) into. Unless a fully qualified path is used, this directory will be created in the current directory. This option is not used if the -lo or -uo option is set. Default is "web". -r --recurse Recurse through all directories on the command line. This option will omit all directories named "slides", "thumbs", "theme", "web" and the value of -wd if that option is set. This option will ONLY be recognized from the command line to help prevent accidents. Note: Any options listed on the command line when using recursion will be applied to all directories. Default is DISABLED. -h --help Display this information and exit -v --version Display version and exit -d --debug <0-5> Set debug level. Default is 0 [directories] Directories to process. Default is . (current). Note: If an option listed says it can be negated you can prefix it with "no" and the opposite effect will happen. Useful for overriding options on the command line that are set elsewhere. e.g. -nouo | --nouse-original will NOT use the original files as slides. SETTING OPTIONS
Options can be used in any of three places: (listed ascending precedence) -- A single line in the $HOME/.jigl/jigl.opts file in the users home directory. -- After the GAL-OPTIONS tag as a single line in the gallery.dat file in each of the album directories. -- On the command line. Regardless of where they are located, they should all be listed in the same form as you would use them on the command line. Example: -lo -iw 6 -noskb Theme files can be located in either the directory jigl is processing or in the .jigl directory in the user's home directory. AUTHOR
jigl was written by Jason Paul <jigl@xome.net>. Its project page is located at http://xome.net/projects/jigl/. This manual page was adapted from the program help text by Nicholas Breen <nbreen@ofb.net> for the Debian project (but may be used by oth- ers). October 8, 2006 JIGL(1)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy