Comparing data in file with values in table


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Comparing data in file with values in table
# 1  
Old 01-22-2008
Comparing data in file with values in table

Hi,

I want to calculate the number of pipe delimiters in a file for all lines seperately.

For eg:i have a file Project.txt

Mohit|chawla|123|678
File1|File2|345|767|678

And my file contains many lines like this
it shd give me the output as
4
5
or give me the output for all the values greater than 4

Last edited by Mohit623; 07-09-2008 at 09:47 AM.. Reason: Question changed
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk: Comparing arguments with in line values of file and printing the result

I need to develop a script where I will take two date arguments as parameter date1 and date2 which will in format YYYYMM. Below is the input file say sample.txt. sample.txt will have certain blocks starting with P1. Each block will have a value 118,1:TIMESTAMP. I need to compare the... (7 Replies)
Discussion started by: garvit184
7 Replies

2. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies

3. Shell Programming and Scripting

Reading and Comparing values of file

Hi gurus.. Am reading a file, counting number of lines and storing it in a variable. Then am passing that variable into If loop for comparision, if the number of lines are greater than 1000 it should split a file if not it should send the file name to archive folder.. but when i execute the... (4 Replies)
Discussion started by: azherkn3
4 Replies

4. Shell Programming and Scripting

Perl: Writing table values to a file

I have a file like this, 1,a,saurav 2,b,rout I want to show this file in a perl cgi page table and want to add a column which will contain a text box. There I will give some manual input, which will be written to the existing file(or a new file) in below format. 1|a|saurav|bangalore... (2 Replies)
Discussion started by: sauravrout
2 Replies

5. Shell Programming and Scripting

Update the table using values from a csv file

i want to run update query for oracle which is in up.sql taking values from a.csv. I have implemented shell script to do it. extn="perl" ls -1 | while read file do echo "$file,$extn" > a.csv done up.sql contains update file_list set filename=$1 where extn=$2; The code to update is... (2 Replies)
Discussion started by: millan
2 Replies

6. Shell Programming and Scripting

Build a table from a list by comparing existing table entries

I am new to this shell scripting.... I have a file which contains list of users. This files get updated when new user comes into the system. I want to create script which will give a table containing unique list of users. When I say unique, it means script should match table while parsing... (3 Replies)
Discussion started by: dchavan1901
3 Replies

7. Emergency UNIX and Linux Support

Comparing date values stored in a file

Hi all, I have written a script which stores data along with requisite dates in a file. I need to compare the stored date values in the file to obtain the row with the highest date value i.e. the recent most entered record in the file. Please help cause i dont know how we can compare dates in... (10 Replies)
Discussion started by: sumi_mn
10 Replies

8. Shell Programming and Scripting

select values from db1 table and insert into table of DB2

Hi I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.) I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Discussion started by: aemunathan
2 Replies

9. Shell Programming and Scripting

Inserting Values From A File Into A Table

Guys, I want to insert some values from a log file into a temporary table. the values in the log file looks like this SV_NAME CC_NAME CP_DISP_RUN_STATE ------- ------------------- ----------------- sble01 ALLTEL WorkMon24Hrs Running I want to enter the... (2 Replies)
Discussion started by: ragha81
2 Replies

10. UNIX for Dummies Questions & Answers

How to load comma seperated values file (*.csv) into Oracle table

Hi all I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so... The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (5 Replies)
Discussion started by: handynas
5 Replies
Login or Register to Ask a Question
gfs_tool(8)						      System Manager's Manual						       gfs_tool(8)

NAME
gfs_tool - interface to gfs ioctl calls SYNOPSIS
gfs_tool COMMAND [OPTION] [PARAMETERS ...] DESCRIPTION
gfs_tool is an interface to a variety of the GFS ioctl calls. Specifying gfs_tool -h prints gfs_tool command line usage (help). Specifying gfs_tool -V prints the gfs_tool version information. COMMANDS
clearflag Flag File1 File2 ... Clear an attribute flag on a file. counters MountPoint [-c] [-i interval] Print out statistics about a filesystem. If -c is specified, gfs_tool keeps running printing out the statistics once per second or, if specified, the interval given with the -i option, in seconds. df MountPoint [-k]|[-H] Print out a space usage summary of a given filesystem. The information printed is more detailed than a standard "df". If -k is specified, the output is given in kilobytes (KB). If -H is specified, the output is given in human readable format (similar to df -h). If neither -k nor -H are specified, the output is given in file system blocks. freeze MountPoint Freeze (quiesce) a GFS cluster. getsb MountPoint Print out the superblock of a mounted filesystem. gettune MountPoint Print out the current values of the tuning parameters in a running filesystem. jindex MountPoint Print out the journal index of a mounted filesystem. layout File [buffersize] Print out on-disk layout information about a file or directory. Buffersize is the size of the buffer (in bytes) that gfs_tool allo- cates to store the file's metadata during processing. It defaults to 4194304 bytes. If you are printing a very big directory you may need to specify a bigger size. list List the currently mounted GFS filesystems. Each line represents a filesystem. The columns represent (in order): 1) A number that is a cookie that represents the mounted filesystem. 2) The name of the device that holds the filesystem (well, the name as the Linux kernel knows it). 3) The lock table field that the filesystem was mounted with. lockdump MountPoint [buffersize] Print out information about the locks this machine holds for a given filesystem. Buffersize is the size of the buffer (in bytes) that gfs_tool allocates to store the lock data during processing. It defaults to 4194304 bytes. margs arguments This loads arguments into the module what will override the mount options passed with the -o field on the next mount. See mount.gfs(8). reclaim File Returns unused on-disk metadata blocks to free blocks. rindex MountPoint Print out the resource group index of a mounted filesystem. quota MountPoint Print out the quota file of a mounted filesystem. Also see the "gfs_quota list" command. sb device proto [newvalue] View (and possibly replace) the name of the locking protocol in the file system superblock. The file system shouldn't be mounted by any client when you do this. sb device table [newvalue] View (and possibly replace) the name of the locking table in the file system superblock. The file system shouldn't be mounted by any client when you do this. sb device ondisk [newvalue] View (and possibly replace) the ondisk format number in the file system superblock. The file system shouldn't be mounted by any client when you do this. No one should have to use this. sb device multihost [newvalue] View (and possibly replace) the multihost format number in the file system superblock. The file system shouldn't be mounted by any client when you do this. No one should have to use this. sb device all Print out the superblock. setflag Flag File1 File2 ... Set an attribute flag on a file. There are four currently supported flags. They are jdata, directio, inherit_jdata, and inherit_directio. The jdata flag causes all the data written to a regular file to be journaled. The jdata flag can only be set (or cleared) if the file is zero length. The directio flag causes all I/O to a regular file to be Direct I/O, even if the O_DIRECT flag isn't used on the open() command. The inherit_jdata flag is set on a directory. It causes all new regular files created in that directory automatically inherit the jdata flag. The inherit_jdata is also inherited by any new subdirectories created in that directory. The inherit_directio flag is set on a directory. It causes all new regular files created in that directory automatically inherit the directio flag. The inherit_directio is also inherited by any new subdirectories created in that directory. settune MountPoint parameter newvalue Set the value of tuning parameter. Use gettune for a listing of tunable parameters. shrink MountPoint Causes any unused inodes to be thrown out of memory. stat File Print out extended stat information about a file. unfreeze MountPoint Unfreeze a GFS cluster. version Print out the version of GFS that this program goes with. withdraw MountPoint Cause GFS to abnormally shutdown a given filesystem on this node. gfs_tool(8)