Sponsored Content
Full Discussion: Add a word to Text file
Top Forums UNIX for Dummies Questions & Answers Add a word to Text file Post 302763711 by vbe on Wednesday 30th of January 2013 11:13:55 AM
Old 01-30-2013
Here you had material to start your work:
https://www.unix.com/shell-programmin...text-file.html

What more do you need? Did you search with google?

Can we see what you did so far AND what is not working?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to substitute more than one word in a text file?

well i have this file here: <XML> <pregate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <system_c>HPREGATE</system_c> <trans_c>HSPG</trans_c> <trans_dt>20060105161333</trans_dt> <user_id_m></user_id_m> <func_c>C</func_c> </pregate> </XML> i want to... (2 Replies)
Discussion started by: forevercalz
2 Replies

2. Shell Programming and Scripting

Can a shell script pull the first word (or nth word) off each line of a text file?

Greetings. I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file. I'm struggling to see how each line can be... (5 Replies)
Discussion started by: tricky
5 Replies

3. Shell Programming and Scripting

[Bash]Attempting to Merge text from one file into another file at the line directly under a word

Hello, This is my first post on the forums. So I want to start by thanking anyone who is kind enough to read this post and offer advise. I hope to be an active contributor now that I've found these forums. I have an issue that I figure would be a good first post.. I have 2 text files... (5 Replies)
Discussion started by: efciem
5 Replies

4. UNIX for Dummies Questions & Answers

Script to add text before the first word on a line in a textfile.

How can i make a script to add text before the first word on a line in a textfile : Example: Old line: is my place New line: this is my place Please use and tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks. (3 Replies)
Discussion started by: mjanssen
3 Replies

5. UNIX for Dummies Questions & Answers

how to read the second word of a text file

Folks, how to read the second word of the first line from a text file. Text file does not have any delimiters in the line and has words at random locations. Basically the text file is a log and i want to capture a number that is in second position. Appreciate your help Venu (1 Reply)
Discussion started by: venu
1 Replies

6. Shell Programming and Scripting

Newb question about getting a word from a text file

Hi everyone. I am new to shell scripting and have been looking at quite a few web pages to try and figure this out, but to no avail. What I am trying to do is get a value from a text file that contains a paragraph of information.. Something similar too: Welcome to random script You are... (1 Reply)
Discussion started by: elemenopee
1 Replies

7. Shell Programming and Scripting

extract a word from text file name

Hi i want to extract the word present before .txt in the text file. For example, Sample_ab_a.txt ----------> i need 'a' Sample_abc_b.txt -----------> i need 'b' Can anyone help me in getting the word extracted (5 Replies)
Discussion started by: Sindhuap
5 Replies

8. Shell Programming and Scripting

Add a word to Text file

Hello, I have a mysql text file. I want add word to it. Thanks for help. Sample sql file: ,'address','166 Warren Street, NY 12534'),(45215,26556,'phone','(518)811-4145'),(151426,15565,'listing_duration','address','122 Hom Street, NY... (6 Replies)
Discussion started by: hoo
6 Replies

9. Shell Programming and Scripting

How to insert a word into a text file?

Hi, I have a text file with one line having few words separated by space and I need to insert another word on "n"th column/field so that previous word should shift right (to n+1st column). how can I do that? It seems we can do using awk but unable to figure out. Please advise, thanks! ... (11 Replies)
Discussion started by: magnus29
11 Replies

10. Shell Programming and Scripting

Organizing text file by Capital Names (capital word ' ' capital word)

Hi I have a file passwd_exmpl that contains: root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/bin:/sbin/nologin daemon:x:2:2:daemon:/sbin:/sbin/nologin adm:x:3:4:adm:/var/adm:/sbin/nologin lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin sync:x:5:0:sync:/sbin:/bin/sync... (5 Replies)
Discussion started by: eladage
5 Replies
SVNPATH(1)																SVNPATH(1)

NAME
svnpath - output svn url with support for tags and branches SYNOPSIS
svnpath svnpath tags svnpath branches svnpath trunk DESCRIPTION
svnpath is intended to be run in a Subversion working copy. In its simplest usage, svnpath with no parameters outputs the svn url for the repository associated with the working copy. If a parameter is given, svnpath attempts to instead output the url that would be used for the tags, branches, or trunk. This will only work if it's run in the top-level directory that is subject to tagging or branching. For example, if you want to tag what's checked into Subversion as version 1.0, you could use a command like this: svn cp $(svnpath) $(svnpath tags)/1.0 That's much easier than using svn info to look up the repository url and manually modifying it to derive the url to use for the tag, and typing in something like this: svn cp svn+ssh://my.server.example/svn/project/trunk svn+ssh://my.server.example/svn/project/tags/1.0 svnpath uses a simple heuristic to convert between the trunk, tags, and branches paths. It replaces the first occurrence of trunk, tags, or branches with the name of what you're looking for. This will work ok for most typical Subversion repository layouts. If you have an atypical layout and it does not work, you can add a ~/.svnpath file. This file is perl code, which can modify the path in $url. For example, the author uses this file: #!/usr/bin/perl # svnpath personal override file # For d-i I sometimes work from a full d-i tree branch. Remove that from # the path to get regular tags or branches directories. $url=~s!d-i/(rc|beta)[0-9]+/!!; $url=~s!d-i/sarge/!!; 1 LICENSE
GPL version 2 or later AUTHOR
Joey Hess <joey@kitenet.net> Debian Utilities 2013-12-23 SVNPATH(1)
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy