Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Removing characters from beginning of multiple files Post 302989138 by israr75 on Monday 9th of January 2017 04:43:44 AM
Old 01-09-2017
Removing characters from beginning of multiple files

Hi,

I have been searching how to do this but I can't seem to find how to do it. Hopefully someone can help.

I have multiplr files, 100's example 12345-zxys.213423.zyz.txt. I want to be able to take all these files and remove the first '12345-' from each of the files. '12345-' these characters are uniqe on each file but of the same length.

I would appreciate if someone can help.

Thanks in advance.

Regards
Israr
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing M^ from multiple files

to do this i usually type dos2unix <file> -o <file> and this will remove the M^ from the end of each file. well i have over 100 files that someone copied that i need. how do i remove the M^. i saw a perl script but i am not familiar with .pl at all really (7 Replies)
Discussion started by: deaconf19
7 Replies

2. Shell Programming and Scripting

Removing from beginning to first : using awk

A have a file npt02-sr40-syn-dc0p014-32x24drw.log:0. Best Value = 0.00144914 npt02-sr40-syn-dc0p014-32x24drw.log:1. Best Value = 0.00115706 npt02-sr40-syn-dc0p014-32x24drw.log:2. Best Value = 0.00094345 npt02-sr40-syn-dc0p014-32x24drw.log:3. Best Value = 0.000925552... (11 Replies)
Discussion started by: kristinu
11 Replies

3. UNIX for Dummies Questions & Answers

Removing Lines Shared by Multiple Files

Hey everyone, I have a question about comparing two files. I have two lists of files. The first list, todo.csv, lists a series of compounds my supervisor wants me to perform calculations on. The second list, done.csv, lists a series of compounds that I have already performed calculations on.... (2 Replies)
Discussion started by: Stuart Ness
2 Replies

4. Shell Programming and Scripting

Removing one or more blank characters from beginning of a line

Hi, I was trying to remove the blank from beginning of a line. when I try: sed 's/^ +//' filename it does not work but when I try sed 's/^ *//' filename it works But I think the first command should have also replaced any line with one or more blanks. Kindly help me in understanding... (5 Replies)
Discussion started by: babom
5 Replies

5. Shell Programming and Scripting

Append Multiple files with file name in the beginning of line

Hi, I have multiple files having many lines like as bvelow: file Name a.txt abc def def xyz 123 5678 file Name b.txt abc def def xyz 123 5678 I would like to append files in the below format to a new file: file Name c.txt (7 Replies)
Discussion started by: rramkrishnas
7 Replies

6. Shell Programming and Scripting

Removing hyphen from beginning and end of a word only.

It is very simple to remove a hyphen from a word anywhere in that word using a simple sed command (sed -i 's/-//g' filename), but I am not able to figure out how to do this: For example, apple -orange tree pipe- banana-shake dupe- What my output should look like: apple orange tree... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

7. UNIX for Dummies Questions & Answers

Renaming Multiple Files by removing characters

Hi I would like to rename Multiple files in a Unix Directory using Ksh Command. Eg ATT8-2011-10-01 00:00:00-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF needs to be renamed as ATT8-2011-10-01-MSA-IMM-SINGLE_AND_FAMILY_COVERAGE-DED-$2000-X114817.PDF Basically the time... (2 Replies)
Discussion started by: pchegoor
2 Replies

8. Shell Programming and Scripting

Removing carriage returns from multiple lines in multiple files of different number of columns

Hello Gurus, I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file. 1|ABC DEF|100|10 2|PQ RS T|200|20 3| UVWXYZ|300|30 4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 Replies

9. Shell Programming and Scripting

Removing a ? from multiple files

Hi all, I have about 1.8 million files in a directory structre, that contain a ? on the end, for example: /testdocs/1/mar/08/08/images/user/{1234-1234-1234-1234}0? Is there a way to go through the testdocs folder, recursively, and remove the ? from all docs that have one on the end? ... (11 Replies)
Discussion started by: tirmUK
11 Replies

10. Shell Programming and Scripting

Selecting text on multiple lines, then removing a beginning and end patterns

I have a file similar to the below. I am selecting only the paragraphs with @inlineifset. I am using the following command sed '/@inlineifset/,/^ *$/!d; s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln This produces @section Correlations between seismograms,,,,}} ... (5 Replies)
Discussion started by: Danette
5 Replies
MCSENDER(8)						      System Manager's Manual						       MCSENDER(8)

NAME
mcsender - Multicast test tool to send multicast test packets SYNOPSIS
mcsender [-t<ttl>] [-i<interface>] ip:port DESCRIPTION
mcsender sends multicast packets to the specified IPv4 or IPv6 multicast address and port. The packets sent contain the string "this is the test message from mclab/mcsender ". OPTIONS
-t<ttl> Set the TTL (or hop limit for IPv6) to the specified value. -i<interface> Specify the interface to use for outgoing multicast datagrams. EXAMPLES
To send datagrams to IPv4 multicast address 239.1.1.1 and port 12345 with a TTL of 3: $ mcsender -t3 239.1.1.1:12345 To send datagrams to IPv4 multicast address 239.1.1.1 and port 12345 with a TTL of 3 out of interface eth1: $ mcsender -ieth1 -t3 239.1.1.1:12345 To send datagrams to IPv6 multicast address ff15::1 and port 12345 with a hop limit of 3: $ mcsender -t3 ff15::1:12345 To send datagrams to IPv6 multicast address ff15::1 and port 12345 with a hop limit of 3 out of interface eth1: $ mcsender -ieth1 -t3 ff15::1:12345 AUTHOR
mcsender was written by Carsten Schill <carsten@cschill.de>. Support for IPv6 was added by Todd Hayton <todd.hayton@gmail.com>. This manual page was written by Julien BLACHE <jblache@debian.org>, for the Debian project (but may be used by others). August 08, 2011 MCSENDER(8)
All times are GMT -4. The time now is 03:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy