Sponsored Content
Top Forums Shell Programming and Scripting Cutting text from one location to another Post 302097786 by hemangjani on Tuesday 28th of November 2006 01:40:40 PM
Old 11-28-2006
Thanks

but, this just prompts the result on the screen. I need to replace it in the file that has the input text string.

I was trying to put your solution in a variable and replace it with changed text, but not successful.

Plus as mentioned earlier it is not a fixed length text, -m could be in different column.

Smilie

Last edited by hemangjani; 11-28-2006 at 02:58 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cutting unwanted text

Hello, I have a log file which looks like this : I want to cut out some text and get printed only : "HTTP GET" and "Time duration: 1013 mls. (1 sec.)" I tried searching the forum for such solution, but I was unable to find it. I also tried awk '/duration/ { print $0 }' mylogfile.log,... (2 Replies)
Discussion started by: sysgate
2 Replies

2. HP-UX

replacing text in specific location

i have a file that looks like this: 000000112/01/2008 D99999 000000 12/01/2008 D99999 000000 12/01/2008 1D99999 i need to replace the blanks into 1 for column 7,18-19 how can this be achieved using awk? Thanks. (1 Reply)
Discussion started by: zeontman
1 Replies

3. UNIX for Advanced & Expert Users

copy files from one location to similar location

I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure, say location 1, /home/rick/tmp_files/1-12/00-25/ here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Discussion started by: pharos467
1 Replies

4. Shell Programming and Scripting

How to cut first line only from a text near a specific column without cutting a word

First I have to say thank you to this community and this forum. You helped me very much builing several useful scripts. Now, I can't get a solution the following problem, I'm stuck somehow. Maybe someone has an idea. In short, I dump a site via lynx and pipe the output in a file. I need to... (7 Replies)
Discussion started by: lowmaster
7 Replies

5. Shell Programming and Scripting

Shell Script for Copy files from one location to another location

Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies

6. Shell Programming and Scripting

Cutting out text from specific portion on filename

Hi, how do I go about cutting out the first numeric characters after the word "access"? access1005101228.merged-00.15.17.86.d8.b8.log.gz (16 Replies)
Discussion started by: GermanJulian
16 Replies

7. Shell Programming and Scripting

File created in a different location instead of desired location on using crontab

Hi, I am logging to a linux server through a user "user1" in /home directory. There is a script in a directory in 'root' for which all permissions are available including the directory. This script when executed creates a file in the directory. When the script is added to crontab, on... (1 Reply)
Discussion started by: archana.n
1 Replies

8. Shell Programming and Scripting

cutting long text by special char around 100 byte and newline

Regard, How can i cut the text by special char(|) around 100 byte and write the other of the text at newline using Perl. ... (3 Replies)
Discussion started by: Shawn, Lee
3 Replies

9. Shell Programming and Scripting

Insert text line to specific location CSV

In Perl. ***edited question below*** Hey all, I am teaching myself some simple CSV file manipulation and have become a little stuck. Say I have the following layout in the CSV file: age,name,locationIs it possible to INSERT data into the CSV into the correct age order. For example, if I had... (1 Reply)
Discussion started by: whyte_rhyno
1 Replies

10. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies
DH_USRLOCAL(1)							     Debhelper							    DH_USRLOCAL(1)

NAME
       dh_usrlocal - migrate usr/local directories to maintainer scripts

SYNOPSIS
       dh_usrlocal [debhelperoptions] [-n]

DESCRIPTION
       dh_usrlocal is a debhelper program that can be used for building packages that will provide a subdirectory in /usr/local when installed.

       It finds subdirectories of usr/local in the package build directory, and removes them, replacing them with maintainer script snippets
       (unless -n is used) to create the directories at install time, and remove them when the package is removed, in a manner compliant with
       Debian policy. These snippets are inserted into the maintainer scripts by dh_installdeb. See dh_installdeb(1) for an explanation of
       debhelper maintainer script snippets.

       When the Rules-Requires-Root field is not (effectively) binary-targets, the directories in /usr/local will have ownership root:staff and
       the mode will be 02775.	These values have been chosen to comply with the recommendations of the Debian policy for directories in
       /usr/local.

       When Rules-Requires-Root has an effective value of binary-targets, the owners, groups and permissions will be preserved with one exception.
       If the directory is owned by root:root, then ownership will be reset to root:staff and mode will be reset to 02775. This is useful, since
       that is the group and mode policy recommends for directories in /usr/local.

OPTIONS
       -n, --no-scripts
	   Do not modify postinst/prerm scripts.

NOTES
       Note that this command is not idempotent. dh_prep(1) should be called between invocations of this command. Otherwise, it may cause multiple
       instances of the same text to be added to maintainer scripts.

CONFORMS TO
       Debian policy, version 2.2

SEE ALSO
       debhelper(7)

       This program is a part of debhelper.

AUTHOR
       Andrew Stribblehill <ads@debian.org>

11.1.6ubuntu2							    2018-05-10							    DH_USRLOCAL(1)
All times are GMT -4. The time now is 11:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy