Sponsored Content
Top Forums Shell Programming and Scripting how to find and comment out lines in one file against another file Post 302511757 by bartus11 on Thursday 7th of April 2011 01:10:21 PM
Old 04-07-2011
By "member" you mean whole lines to be the same? Or just the first column?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

find string, then get the next 3 lines in a file

Hi all. HPUX - /bin/sh (posix) I am parsing a 3 field flat file, space deliminted example data.file acct dining mem open 0 50 dep 50 0 close 255 0 acct plus mem open 100 100 dep 50 0 close 323 0 I would like to find strings, then write the next 3 lines out to another file ... (8 Replies)
Discussion started by: lyoncc
8 Replies

2. Shell Programming and Scripting

How to find number of lines in a file

Hi How do I find number of lines of a file? Below commands returned 0. But, the file is showing 20 lines when I open it in editplus tool. Each line contains 601 columns. Please advise I want to incorporate some word at the begining of each of those 20 lines -Somesh $ wc -l <... (2 Replies)
Discussion started by: somesh_p
2 Replies

3. Shell Programming and Scripting

using awk to comment out lines to the end of file

Hello, I have a file as follow a b c c d d e I would like to write a awk command to insert # from the first occurence of "c" to the end of the files. OUTPUT should be like this a b #c (5 Replies)
Discussion started by: phamp008
5 Replies

4. Shell Programming and Scripting

Find and change the lines in the file.

Hi Everyone, I have a JIL (Job Information Language) Definition for Several Jobs in a file. I would like to do the following: insert_job: KS_INT_BIZ_INT job_type: c command: /home/filter/script.sh INT machine: MACHINE owner: filter permission: gx,mx date_conditions: 1 days_of_week:... (3 Replies)
Discussion started by: filter
3 Replies

5. UNIX for Dummies Questions & Answers

find lines in another file based on contents in a second file

Hello, I have a file with tab delimited columns like: File1 A 2 C R F 4 D Q C 9 A B ...... I want to grep out the lines in a second file, File2, corresponding to each line in File1 Can I do this: while read a b c d do grep '$a\t$b\t$c\t$d' File2 >>... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

6. UNIX for Dummies Questions & Answers

Comment lines in file without vi editor

Legends, Can you please help me in following. I need to comment lines from “/tmp/a.txt” from the line A to line B through the command prompt only. Please use variables not direct values like 2 or 5 It can be done with VI editor but it's not matches with my requirement (: 2,5 s/^/#/g). ... (1 Reply)
Discussion started by: sdosanjh
1 Replies

7. Shell Programming and Scripting

Comment ( -- ) lines from 10 to 25 for every .sql file

Platform : RHEL 5.4 I have several .sql files in a directory. I want to comment lines 10 to 25 for all .sql files. How can I do this ? The symbol for comment in SQL is -- eg: -- select salary from emp where empname = 'URS' ; (3 Replies)
Discussion started by: omega3
3 Replies

8. Shell Programming and Scripting

Find all lines in file such that each word on that line appears in at least n lines of the file

I have a file where every line includes four expressions with a caret in the middle (plus some other "words" or fields, always separated by spaces). I would like to extract from this file, all those lines such that each of the four expressions containing a caret appears in at least four different... (9 Replies)
Discussion started by: uncleMonty
9 Replies

9. Shell Programming and Scripting

Script using awk to find and replace a line, how to ignore comment lines

Hello, I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

10. UNIX for Beginners Questions & Answers

Remove Comment Lines From Script/Input File

Hello, I have a SAS code that predominantly has comments line and the real code like below and i want to remove ONLY THE COMMENTS from the code in the single line or spanned across multiple lines. /******************************************************************** *** This Is a Comment... (4 Replies)
Discussion started by: arooonatr
4 Replies
shares-admin(1) 						   User Commands						   shares-admin(1)

NAME
shares-admin - Enables the configuration of shared NFS / SMB directories. SYNOPSIS
shares-admin [--add-share=PATH] [gnome-std-options] DESCRIPTION
shares-admin enables a user to configure the sharing of directories / filesystems. These can be shared using either NFS or SAMBA. This is linked to the ability to right-click on a directory in Nautilus and select "Share folder". OPTIONS
The following options are supported: -a, --add-share=PATH Configure a share for the specified PATH. gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more informa- tion. EXAMPLES
Example 1: Running the main application. example% shares-admin Example 2: Sharing a specific directory. example% shares-admin --add-share=/export/home/shared EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/shares-admin Executable for directory sharing configuration. /var/spool/setup-tool-backends/backup/shares Backup directory for files that are modified. /var/run/setup-tool-backends/debug/shares Debug logs can be found under here. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-system-tools | +-----------------------------+-----------------------------+ |Interface stability |Uncommitted | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. users-admin(1), network-admin(1), services-admin(1), time-admin(1), gnome-std-options(5), attributes(5) NOTES
Written by Darren Kenny, Sun Microsystems Inc., 2006. SunOS 5.11 6 Nov 2006 shares-admin(1)
All times are GMT -4. The time now is 03:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy