Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Shell Script using Join, empty field help! Post 302170334 by tibbyuk on Monday 25th of February 2008 09:09:25 AM
Old 02-25-2008
Shell Script using Join, empty field help!

Deleted####

Last edited by tibbyuk; 02-25-2008 at 03:07 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to delete empty files in a shell script

I'm trying to figure out a way to delete empty files in a directory. I have a cron that runs and creates a flat file every 15 mins. However, most times at night the flat file will be empty. I'd like to run a script to delete empty files that end with *.dat Any suggestions? Rich (1 Reply)
Discussion started by: rpnuge
1 Replies

2. Shell Programming and Scripting

Join Using last field

Hie all, I am trying to join my files using the last field of a line. I have tried reversing the line using rev, then join them and re-reverse it again. It works well with cygwin bash shell but not in Unix! Here is my code: rev $1 > rev_file1 rev $2 > rev_file2 join rev_file1 rev_file2 |... (1 Reply)
Discussion started by: summer11
1 Replies

3. Shell Programming and Scripting

shell script to join multiple files

I am a new to Linux and try to write a script to join three multiple files. For example, there are three files file1 # comment a Kevin b Vin c Sam file 2 # comment a 10 b 20 c 40 file 3 # comment a blue b yellow (7 Replies)
Discussion started by: bonosungho
7 Replies

4. Shell Programming and Scripting

Need to check for empty file in C shell script

I am running a C shell script. I have an output file from a previous step and I need to run "something" in the next step to check if the file is empty. If the file is empty, then the job script should finish EOJ. If the file is not empty then the job script should abend. Please help Thanks. (4 Replies)
Discussion started by: jclanc8
4 Replies

5. Shell Programming and Scripting

perl script to check if empty files are created and delete them and run a shell script

I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies

6. Shell Programming and Scripting

Shell script to remove empty files

Hi All, Can anyone please write a shell script to remove the empty files using an if condition. please help me out , urgent thanks (6 Replies)
Discussion started by: muthi_murali
6 Replies

7. UNIX for Dummies Questions & Answers

how to join two files using "Join" command with one common field in this problem?

file1: Toronto:12439755:1076359:July 1, 1867:6 Quebec City:7560592:1542056:July 1, 1867:5 Halifax:938134:55284:July 1, 1867:4 Fredericton:751400:72908:July 1, 1867:3 Winnipeg:1170300:647797:July 15, 1870:7 Victoria:4168123:944735:July 20, 1871:10 Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies

8. Shell Programming and Scripting

Shell Script for enter folders and join file

Hello everyone. I have a dlink cam that save recordings splitted for hours. Each hour folder contain a lot of small avi files. Repository has the following directories structure: \_20140101/ \_ 01 \_a.avi \_b.avi \_ 02 \_c.avi ... (3 Replies)
Discussion started by: setterx
3 Replies

9. Web Development

Javascript to check field is empty then execute rest of script

I have found this bit of code that nearly does what I want. Basically 3 input fields, I want to copy t2 to t3 as it's typed but only if t1 contains data AND t3 is empty: <input type="text" id="t1" /> <input type="text" id="t2" /> <input type="text" id="t3" /> <script> var t2 =... (4 Replies)
Discussion started by: barrydocks
4 Replies

10. Shell Programming and Scripting

To check whether the file is empty or not in shell script (sh)

Hi All, I need to check a file whether it exists and also whether it is empty or not. I have a code for this but it is not working as per my requirement. Can anyone pls suggest me on this. function funcFLSanityCheck { if then echo "${varFLSentFileListPath}/${varFLSentFileName}... (7 Replies)
Discussion started by: Arun1992
7 Replies
VACUUM(7)							   SQL Commands 							 VACUUM(7)

NAME
VACUUM - garbage-collect and optionally analyze a database SYNOPSIS
VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ table ] VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ table [ (column [, ...] ) ] ] INPUTS FULL Selects ``full'' vacuum, which may reclaim more space, but takes much longer and exclusively locks the table. FREEZE Selects aggressive ``freezing'' of tuples. VERBOSE Prints a detailed vacuum activity report for each table. ANALYZE Updates statistics used by the optimizer to determine the most efficient way to execute a query. table The name (optionally schema-qualified) of a specific table to vacuum. Defaults to all tables in the current database. column The name of a specific column to analyze. Defaults to all columns. OUTPUTS VACUUM The command is complete. INFO: --Relation table-- The report header for table. INFO: Pages 98: Changed 25, Reapped 74, Empty 0, New 0; The analysis for table itself. INFO: Index index: Pages 28; The analysis for an index on the target table. DESCRIPTION
VACUUM reclaims storage occupied by deleted tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by UPDATE are not physically removed from their table; they remain present until a VACUUM is done. Therefore it's necessary to do VACUUM periodically, espe- cially on frequently-updated tables. With no parameter, VACUUM processes every table in the current database. With a parameter, VACUUM processes only that table. VACUUM ANALYZE performs a VACUUM and then an ANALYZE for each selected table. This is a handy combination form for routine maintenance scripts. See ANALYZE [analyze(7)] for more details about its processing. Plain VACUUM (without FULL) simply reclaims space and makes it available for re-use. This form of the command can operate in parallel with normal reading and writing of the table, as an exclusive lock is not obtained. VACUUM FULL does more extensive processing, including moving of tuples across blocks to try to compact the table to the minimum number of disk blocks. This form is much slower and requires an exclu- sive lock on each table while it is being processed. FREEZE is a special-purpose option that causes tuples to be marked ``frozen'' as soon as possible, rather than waiting until they are quite old. If this is done when there are no other open transactions in the same database, then it is guaranteed that all tuples in the database are ``frozen'' and will not be subject to transaction ID wraparound problems, no matter how long the database is left un-vacuumed. FREEZE is not recommended for routine use. Its only intended usage is in connection with preparation of user-defined template databases, or other databases that are completely read-only and will not receive routine maintenance VACUUM operations. See the Administrator's Guide for details. NOTES We recommend that active production databases be VACUUM-ed frequently (at least nightly), in order to remove expired rows. After adding or deleting a large number of records, it may be a good idea to issue a VACUUM ANALYZE command for the affected table. This will update the system catalogs with the results of all recent changes, and allow the PostgreSQL query optimizer to make better choices in planning user queries. The FULL option is not recommended for routine use, but may be useful in special cases. An example is when you have deleted most of the rows in a table and would like the table to physically shrink to occupy less disk space. VACUUM FULL will usually shrink the table more than a plain VACUUM would. USAGE
The following is an example from running VACUUM on a table in the regression database: regression=> VACUUM VERBOSE ANALYZE onek; INFO: --Relation onek-- INFO: Index onek_unique1: Pages 14; Tuples 1000: Deleted 3000. CPU 0.00s/0.11u sec elapsed 0.12 sec. INFO: Index onek_unique2: Pages 16; Tuples 1000: Deleted 3000. CPU 0.00s/0.10u sec elapsed 0.10 sec. INFO: Index onek_hundred: Pages 13; Tuples 1000: Deleted 3000. CPU 0.00s/0.10u sec elapsed 0.10 sec. INFO: Index onek_stringu1: Pages 31; Tuples 1000: Deleted 3000. CPU 0.01s/0.09u sec elapsed 0.10 sec. INFO: Removed 3000 tuples in 70 pages. CPU 0.02s/0.04u sec elapsed 0.07 sec. INFO: Pages 94: Changed 0, Empty 0; Tup 1000: Vac 3000, Keep 0, UnUsed 0. Total CPU 0.05s/0.45u sec elapsed 0.59 sec. INFO: Analyzing onek VACUUM COMPATIBILITY
SQL92 There is no VACUUM statement in SQL92. SQL - Language Statements 2002-11-22 VACUUM(7)
All times are GMT -4. The time now is 02:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy