Sponsored Content
Top Forums Shell Programming and Scripting Sed, how replace specific symbols between two patterns Post 303015179 by Tapiocapioca on Thursday 29th of March 2018 03:09:54 PM
Old 03-29-2018
Really thank you, you have one coffee paid if you will visit Italy Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to replace symbols by position using SED

Hi all, I need your help. For example I have string in file.txt: -x -a /tmp/dbarchive_NSS_20081204 -f 900 -l 1 2008/12/04 2008/12/04 So, I need to replace symbols from (for e.g.) position 26 till 33 with symbols which I have in file replace.txt And I have no idea how to do it. If... (1 Reply)
Discussion started by: nypreH
1 Replies

2. Shell Programming and Scripting

using sed to replace a specific string on a specific line number using variables

using sed to replace a specific string on a specific line number using variables this is where i am at grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies

3. Shell Programming and Scripting

Using sed to replace specific character and specific position

I am trying to use sed to replace specific characters at a specific position in the file with a different value... can this be done? Example: File: A0199999123 A0199999124 A0199999125 Need to replace 99999 in positions 3-7 with 88888. Any help is appreciated. (5 Replies)
Discussion started by: programmer22
5 Replies

4. Shell Programming and Scripting

how to replace specific character , if possible using sed

My script is extracting data from SQl session, however sometimes the result contains one or multiple space after/before any numerical value. e,g . "123","1 34","1 3 45", "43 5" How to remove these unwanted spaces..so that I can get the following result : "123","134",1345","435" (1 Reply)
Discussion started by: mady135
1 Replies

5. Shell Programming and Scripting

Sed position specific replace

I'm drawing a blank on how to use sed to replace selectively based on position in the string (vs nth occurence): hello.|there.|how.|are.|you.| I want the period removed in the 3rd item (as defined by the pipe delimiter) if a period is present. So the result in this case would be: ... (2 Replies)
Discussion started by: tiggyboo
2 Replies

6. Shell Programming and Scripting

Using sed to replace a string in a specific position

I asked this before, but my problem got more complicated. Heres what I am trying to do: I'm trying to replace a string at a certain location with another string. Heres the file I'm trying to change: \E I want to replace the escape code at the 3rd line, 2nd column with this escape code... (3 Replies)
Discussion started by: tinman47
3 Replies

7. Shell Programming and Scripting

Replace specific field on specific line sed or awk

I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work. Brief overview: I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies

8. UNIX for Dummies Questions & Answers

Use sed to replace but only in a specific column of the text file

Hi, I would like to use sed to replace NA to x ('s/NA/x/g'), but only in the 5th column of the space delimited text file, nowhere else. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

9. Shell Programming and Scripting

Using sed to replace a word at specific location

I'm try to change a the prohibit to aix for the lines starting with ssh and emagent and rest should be the same. Can anyone please suggest me how to do that using a shell script or sed passwd account required /usr/lib/security/pam_prohibit passwd session required ... (13 Replies)
Discussion started by: pjeedu2247
13 Replies

10. Shell Programming and Scripting

sed command on AIX, replace specific characters

Hi, Im using sed on an AIX machine. I am trying to change the 137-139 characters if they are a ' 36'/'000' to a '036'. The positions that need to be changed are fixed. the source data that I have is$cat v.txt 4000422985400050462239065593606500000007422985707771046154054910075641MC0318AMWAY... (9 Replies)
Discussion started by: dsid
9 Replies
jfs_debugfs(8)						      JFS file system editor						    jfs_debugfs(8)

NAME
jfs_debugfs - shell-type JFS file system editor SYNOPSIS
jfs_debugfs device DESCRIPTION
jfs_debugfs is a program which can be used to perform various low-level actions on a JFS formatted device. device is the special file name corresponding to the actual device to be edited (e.g. /dev/hdb1). jfs_debugfs must be run as root. COMMANDS
a[lter] <block> <offset> <hex_string> replaces the data located at the <offset> of <block> with <hex_string> <block> is the block number - given in decimal <offset> is the offset within that block - given in hexadecimal <hex_string> is an even-numbered string of hexadecimal digits to write to the disk b[tree] <block> [<offset>] * not implemented yet * displays one node of the btree located at <offset> of <block> and enters a subcommand mode to navigate the btree SUBCOMMANDS: l => visit left sibling m => modify current node p => visit parent node r => visit right sibling [0-9] => visit the n'th child node x => exit subcommand mode cb[blfsck] displays the area used by ClearBadBlockList for communication with fsck SUBCOMMANDS: m => modify entries x => exit subcommand mode dir[ectory] <inode_number> [<file_set>] displays the directory entries at <inode_number> and enters subcommand mode <inode_number> is the directory's inode - given in decimal <file_set> currently must be zero SUBCOMMANDS: m => modify entries x => exit subcommand mode d[isplay] [<block> [<offset> [<format> [<count>]]]] displays <count> objects located at the <offset> of <block> in <format> <block> is the block number - given in decimal <offset> is the offset within <block> - given in hexadecimal <format> is one of the following: a => ascii b => block allocation map d => decimal i => inode I => inode allocation map s => superblock x => hexadecimal X => extent allocation descriptor <count> is the number of objects to display - given in decimal dm[ap] displays aggregate disk (block) map SUBCOMMANDS m => modify map fields f => display free count t => display tree levels x => exit subcommand mode dt[ree] <inode_number> [<file_set>] displays root of the directory btree located at <inode_number> and enters a subcommand mode to navigate the btree <inode_number> is the directory's inode - given in decimal <file_set> currently must be zero SUBCOMMANDS l => visit left sibling m => modify current node p => visit parent node (not parent directory) r => visit right sibling [0-9] => visit the n'th child node x => exit subcommand mode fsckw[sphdr] displays the header of the fsck workspace in the aggregate SUBCOMMANDS: m => modify entries x => exit subcommand mode h[elp] [<command>] displays help for <command> if no command is given, all possible commands are displayed ia[g] [<IAG_number>] [a | s | <file_set>] displays IAG information for <IAG_number> and enters subcommand mode <IAG_number> is given in decimal a is to use the primary aggregate inode table s is to use the secondary aggregate inode table <file_set> currently must be zero SUBCOMMANDS e => display/modify inode extents map m => modify IAG p => display/modify persistent map w => display/modify working map x => exit subcommand mode i[node] [<inode_number>] [a | s | <file_set>] displays inode information for <inode_number> and enters subcommand mode <inode_number> is given in decimal a is to use the primary aggregate inode table s is to use the secondary aggregate inode table <file_set> currently must be zero SUBCOMMANDS a => display/modify inode's ACL m => modify inode x => exit subcommand mode logs[uper] displays the journal log superblock and enters subcommand mode SUBCOMMANDS m => modify journal log superblock x => exit subcommand mode q[uit] exits jfs_debugfs se[t] [<variable> <value>] * not implemented yet * set user-defined <variable> to <value> if no arguments are given, displays all set variables <variable> must begin with an alphabetic character su[perblock] [p | s] displays superblock data p displays the primary superblock s displays the secondary superblock SUBCOMMANDS: m => modify entries x => exit subcommand mode s2p[erblock] [p | s] displays alternate superblock data p displays the primary superblock s displays the secondary superblock SUBCOMMANDS: m => modify entries x => exit subcommand mode u[nset] <variable> * not implemented yet * deletes user-defined <variable> xt[ree] <inode_number> [<file_set>] displays root of the non-directory btree located at <inode_number> and enters a subcommand mode to navigate the btree <inode_number> is the directory's inode - given in decimal <file_set> currently must be zero SUBCOMMANDS l => visit left sibling m => modify current node p => visit parent node (not parent directory) r => visit right sibling [0-9] => visit the n'th child node x => exit subcommand mode REPORTING BUGS
If you find a bug in JFS or jfs_debugfs, please report it via the bug tracking system ("Report Bugs" section) of the JFS project web site: http://jfs.sourceforge.net/ Please send as much pertinent information as possible, including the complete output of running jfs_fsck with the -v and -n options on the JFS device. SEE ALSO
jfs_fsck(8), jfs_mkfs(8), jfs_fscklog(8), jfs_logdump(8), jfs_tune(8), AUTHORS
Barry Arndt (barndt@us.ibm.com) William Braswell, Jr. jfs_debugfs is maintained by IBM. See the JFS project web site for more details: http://jfs.sourceforge.net/ October 29, 2002 jfs_debugfs(8)
All times are GMT -4. The time now is 08:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy