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
gfs2_tool(8)						      System Manager's Manual						      gfs2_tool(8)

NAME
gfs2_tool - interface to gfs2 ioctl/sysfs calls SYNOPSIS
gfs2_tool COMMAND [OPTION]... DESCRIPTION
gfs2_tool is an interface to a variety of the GFS2 ioctl/sysfs calls. Some of the functions of gfs_tool have been replaced by standard sys- tem tools such as mount and chattr, so gfs2_tool doesn't have as many options as gfs_tool used to. COMMANDS
clearflag Flag File1 File2 ... Clear an attribute flag on a file. This is now obsolete and kept only for backward compatibility, chattr is the preferred way to clear attribute flags. See setflag for available flags. This option will probably be removed at a future date. freeze MountPoint Freeze (quiesce) a GFS2 cluster. gettune MountPoint Print out the current values of the tuning parameters in a running filesystem. A better source of similar (more comprehensive) information is that in the /proc/mounts file. Running the mount command with no arguments will also provide the same information. This option is considered obsolete and will probably be removed at some future date. journals MountPoint Print out information about the journals in a mounted filesystem. lockdump MountPoint Print out information about the locks this machine holds for a given filesystem. This information is also available via the debugfs glock dump file, and accessing that file is the preferred method of obtaining a dump of the glock state. 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 uuid [newvalue] View (and possibly replace) the uuid in the file system superblock. The file system shouldn't be mounted by any client when you do this. The new uuid value should be in the standard uuid format. For example: 1AEA8269-15C5-72BD-6D83-8720B17AA4EE sb device all Print out the superblock. setflag Flag File1 File2 ... Set an attribute flag on a file. The currently supported flags are jdata, immutable, appendonly, noatime, and sync. The chattr command is the preferred way to set attributes on files. This option will probably be removed at a future date. The jdata flag causes all the data written to a file to be journaled. If the jdata flag is set for a directory, all files and directories subsequently created within that directory are also journaled. This behavior replaces the old inherit_jdata flag from gfs. Same as chattr +j. The immutable flag marks the file immutable. The behavior is similar to the immutable flag in the ext2/3 filesystems. All write access is denied. Same as chattr +i. The appendonly flag causes all data to be written at the end of the file. Same as chattr +a. The noatime flag disables updates to the file's access time. Same as chattr +A. The sync flag causes data written to the file to be sync'ed to stable storage immediately. Same as chattr +S. settune MountPoint parameter newvalue Set the value of tuning parameter. Use gettune for a listing of tunable parameters. The mount -oremount command is the preferred way to set the values of tunable parameters. At some future stage, when all parameters can be set via mount, this option will be removed. unfreeze MountPoint Unfreeze a GFS2 cluster. version Print out the version of GFS2 that this program goes with. withdraw MountPoint Cause GFS2 to abnormally shutdown a given filesystem on this node. This feature is only useful for testing and should not be used during normal filesystem operation. gfs2_tool(8)