Sponsored Content
Full Discussion: Help in SED and CUT.
Top Forums Shell Programming and Scripting Help in SED and CUT. Post 302136841 by pbsrinivas on Thursday 20th of September 2007 02:06:57 AM
Old 09-20-2007
130 to 134 make if 5 char's

for 131 to 134....


cat Inp_file|sed 's/^\(.\{130\}\)\(XXXX\)\(.*$\)/\1YYYY\3/g'
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cut vs. sed vs. awk ?

hi again...need new help guys:p the file contains following infos... users/abc/bla1.exe newusers/defgh/ik/albg2.exe users2/opww/ertz/qqwertzu/rwerwew.exe how to get the file content into... users/abc/ newusers/defgh/ik/ users2/opww/ertz/qqwertzu/ with... you can erase the... (5 Replies)
Discussion started by: svennie
5 Replies

2. Shell Programming and Scripting

SED and Cut question

I am trying to cut and delete using sed and redirect back into the file. This is not working write. When testing the script, it hangs. Any idea what I am doing wrong here. ################ Reads the input file to cut volumes for returns and CUT_ERVTAPE_FILE() { echo "working on cut... (2 Replies)
Discussion started by: gzs553
2 Replies

3. Shell Programming and Scripting

cut sed grep or other?

Hi Is there a way to cut the last two characters off a word or number given that this word or number can be of varying length? I have tried something like TEST=`echo $OLD | cut -c 1-5` where $OLD is a variable containing a number like 1234567 which gives a result of 12345. This is fine... (4 Replies)
Discussion started by: rleebife
4 Replies

4. Shell Programming and Scripting

awk,sed or cut problem

Good afternoon, Sir's, I would like to seek your assistance regarding on this matter. $cat file1 111 aaaa bbb aass aaa files file1 temp temp1 pix 222 11 22 1 33 44 desired output: aaaa bbb aass files file1 temp1 222 11 22 1 33 44 thanks (7 Replies)
Discussion started by: invinzin21
7 Replies

5. Shell Programming and Scripting

cut in sed/awk

Hi Can i have an example where i should be able to cut columns (like for eg cut -c 1-3) in sed or awk. Regards Dhana (12 Replies)
Discussion started by: dhanamurthy
12 Replies

6. Shell Programming and Scripting

Passing a variable to sed or cut

:confused: Is it possible to send a variable to a sed or cut command? I have a test script as below: counter=1 while read line do # Test the file printf "$line" > temp$counter pref=$(cut c1-2000 $temp$counter | sed 's///g' | sed 's|.*PutTime\(.*)Origin.*|\1|') printf" let... (5 Replies)
Discussion started by: gugs
5 Replies

7. UNIX for Dummies Questions & Answers

How to use cut or sed for my little script.

Hello people, I have a little script that has to compare some files (exe files)... so i find all the files in the given paths (2 paths) and it generates 2 txt files (named 1.txt and 2.txt, they have to be identical) i need to have a little IF function to compare the 2 files and see if they are... (2 Replies)
Discussion started by: valiadi
2 Replies

8. Shell Programming and Scripting

Substring using cut/awk/sed

Hi Gurus,I have a seemingly simple problem but struggling with it.It is as follows : I/p string - ABCDEFGHIJ20100909.txt desired o/p - AB,DEF,20100909,ABCDEFGHIJ20100909.txt How to achieve it ?Thanks in advance. Please use code tags, thank you (20 Replies)
Discussion started by: sumoka
20 Replies

9. Shell Programming and Scripting

sed cut columns

hello everyone ! i face the following problem as i use sed to ignore some columns of an output. the command i use is sed 's/^\(*\) \(*\).*/\1 \2/' as i only want the 2 first columns the command finger returns the problem is that for some lines the results are fine but for other lines... (8 Replies)
Discussion started by: vlm
8 Replies

10. Shell Programming and Scripting

sed should cut seconds

Hi! I need help to modify a comma-sep. file. I tried to cut the secons of a timestamp. ... 11,05/15/12,13:20:00,Raw Counts,58313,5280,6967 13,05/15/12,13:40:00,Raw Counts,70637,6592,8648 ... it should be: 11,05/15/12,13:20,Raw Counts,58313,5280,6967 13,05/15/12,13:40,Raw... (5 Replies)
Discussion started by: IMPe
5 Replies
NBP(1)							      General Commands Manual							    NBP(1)

NAME
nbplkup, nbprgstr, nbpunrgstr - access NBP database SYNOPSIS
nbplkup [ -r nresp ] [ nbpname ] nbprgstr [ -p port ] nbpname nbpunrgstr nbpname DESCRIPTION
nbprgstr registers nbpname with atalkd(8), at the given port. nbpunrgstr informs atalkd that nbpname is no longer to be advertised. nbplkup displays up to nresp (default 1000) entities registered on the AppleTalk internet. nbpname is parsed by nbp_name(3). An `=' for the object or type matches anything, and an `*' for zone means the local zone. The default values are taken from the NBPLKUP environment variable, parsed as an nbpname. EXAMPLE
Find all devices of type LaserWriter in the local zone. example% nbplkup :LaserWriter Petoskey:LaserWriter 7942.129:218 Gloucester:LaserWriter 8200.188:186 Rahway:LaserWriter 7942.2:138 517 Center:LaserWriter 7942.2:132 ionia:LaserWriter 7942.2:136 Evil DEC from Hell:LaserWriter 7942.2:130 Hamtramck:LaserWriter 7942.2:134 Iron Mountain :LaserWriter 7942.128:250 example% SEE ALSO
nbp_name(3), atalkd(8). netatalk 1.2 17 Dec 1991 NBP(1)
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy