Sponsored Content
Full Discussion: sed substitution
Top Forums Shell Programming and Scripting sed substitution Post 302540776 by shekhar2010us on Thursday 21st of July 2011 02:33:42 PM
Old 07-21-2011
I already tried but its slower than what I need....

I am trying to create a data file, which will look sonething like:
sed "3;6;9........ s/Y/N/" File1 (by running a for/while loop)
and then will execute this file..... hopefully this wud be faster....
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Substitution using sed

I know we can substitute a string using sed but how? For example: sed 's/(old variable)/(new variable)/ details.dat Am I suppose to put $old variable or whatever? Because I tried many times, it didnt work by putting $old variable. Am I suppose to enclose it with "" or ''? Please help (3 Replies)
Discussion started by: Ohji
3 Replies

2. UNIX for Dummies Questions & Answers

sed substitution

Hi, I have a set of files containing strings like I.TEST1_TEST2 or B.ESSA_ESSB for example. Does somebody know how to substitute these strings whith the same name and an extension "_V1" (ie. I.TEST1_TEST2_V1) using sed command or else ? (3 Replies)
Discussion started by: jo_aze
3 Replies

3. Shell Programming and Scripting

Substitution using SED

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as... (2 Replies)
Discussion started by: shubhranshu
2 Replies

4. Shell Programming and Scripting

SED Substitution

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as well to... (1 Reply)
Discussion started by: shubhranshu
1 Replies

5. Shell Programming and Scripting

SED Substitution

Hi guys, Can u please help me to replace (-) with (/) in a file containing no of records using "sed " command in unix. thanks in advance. subhendu (5 Replies)
Discussion started by: subhendu81
5 Replies

6. Shell Programming and Scripting

sed substitution

Hi I am trying to do a text insertion in a text file at a particular line number in a shell script. However its not working. sed '122i\ > for j in \`echo $MyList\` ; do perl -pi -e\'s#01\/01\/2009#01\/01\/2011#\' $j ; done' $HOME/MyScript.ksh The Actual line to be inserted at line 122... (5 Replies)
Discussion started by: som.nitk
5 Replies

7. UNIX for Dummies Questions & Answers

Help with sed substitution

I'm a noob to unix, and I have a line of data like the following: title=Boston|tcolor=green|desc=Large city in New England|url=www.boston.com Is there a way to change a field value with sed substitution? (i.e. change tcolor=green to tcolor=blue) I figured out: sed... (19 Replies)
Discussion started by: stabby
19 Replies

8. Shell Programming and Scripting

Substitution with sed

I have a file with some numbers having single quotes around them which I want to remove. i.e. '923930' -> 23930 If it can be done without using sed thats fine. I have tried with sed but can't think how to replace this pattern on only the numbers (13 Replies)
Discussion started by: user_invalid
13 Replies

9. UNIX for Dummies Questions & Answers

sed substitution

How can you use sed with a line of code that reads: 67899:Bill:Williams:Maple Dr.:45908600 Let us say we want to replace Maple Dr. with Oak St. (1 Reply)
Discussion started by: yonkers062986
1 Replies

10. Shell Programming and Scripting

sed substitution

Hi everyone, I need very simple sed command to change a parameter in a text file. I have a line in this text which is like set xx 0.5 A program reads this file and does some algebraic calculations. So to make a parameter scan I need to change the value of xx. I thought I can do... (7 Replies)
Discussion started by: hayreter
7 Replies
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)
All times are GMT -4. The time now is 05:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy