Sponsored Content
Full Discussion: vi help
Top Forums Shell Programming and Scripting vi help Post 302536870 by appstosms on Wednesday 6th of July 2011 11:54:40 AM
Old 07-06-2011
vi help

hello all
this is my frist post, i feel sorry if this is wrongly classified or a duplicate one.
issue is like i need help in vi as subject lines says
i am having a file which is comma seperated something like mentioned below

abc, xydfg, sdfiert, rsdfkh, wrtiurte , ertoue
asdsdfsdf, rtertre, ertrete, ertretre
adjfsdfs, sdfshkj
akjdhfsdf, sdfkjhhert, srterkjh

for what ever reason, i want to make this file in the following format where there should be only last 2 columns or ar most last 3.

this is what i want this file to look like

abc xydfg sdfiert rsdfkh, wrtiurte , ertoue
asdsdfsdf rtertre, ertrete, ertretre
adjfsdfs, sdfshkj
,akjdhfsdf, sdfkjhhert, srterkjh


I want this file should have only last 3 commas (,) and all other should be either deleted or replaced by space.


Kindly help

Thanks in advance
 
FS_WHEREIS(1)						       AFS Command Reference						     FS_WHEREIS(1)

NAME
fs_whereis - Reports each file server housing a file or directory SYNOPSIS
fs whereis [-path <dir/file path>+] [-help] fs whe [-p <dir/file path>+] [-h] DESCRIPTION
The fs whereis command returns the name of each file server machine that houses the volume containing each directory or file named by the -path argument. OPTIONS
-path <dir/file path>+ Names each AFS file or directory for which to return the host file server machine. Partial pathnames are interpreted relative to the current working directory, which is also the default value if this argument is omitted. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output includes a line for each specified directory or file. It names the file server machine on which the volume that houses the specified directory or file resides. A list of multiple machines indicates that the directory or file is in a replicated volume. Machine names usually have a suffix indicating their cell membership. If the cell is not clear, use the fs whichcell command to display the cell in which the directory or file resides. To display the cell membership of the local machine, use the fs wscell command. EXAMPLES
The following example indicates that volume housing the directory /afs/abc.com resides is replicated on both "fs1.abc.com" and "fs3.abc.com": % fs whereis -path /afs/abc.com File /afs/abc.com is on hosts fs1.abc.com fs3.abc.com PRIVILEGE REQUIRED
None SEE ALSO
fs_whichcell(1), fs_wscell(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_WHEREIS(1)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy