11-03-2012
@grizzledtop: he already said in his first post that his sed doesn't have the "-i" flag. Only GNUs "sed" has this so its usage is strongly discouraged if you want to write portable scripts.
You might want to
read this to understand why it is impossible.
I hope this helps.
bakunin
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi! I am a newbee. I would really appreciate if you can answer the following question:
I have a huge data file, 214MB with several coloumns. I need to delete the very last line of the file. Everything I know takes a lot of time to do it ( because I have to open the file in an editor or run a... (3 Replies)
Discussion started by: Garuda
3 Replies
2. Ubuntu
Hi,
My ubuntu flavor always create temporary files having filename followed by ~ on editing. For eg: if I am editing a file called "sip.c", automatically a temporary (bkup) file is getting created with the name "sip.c~". How to avoid this file creation? (7 Replies)
Discussion started by: royalibrahim
7 Replies
3. Shell Programming and Scripting
Hi All,
I need to create a file which contains the list of all the files present in that directory.
e.g.,
ls /export/home/user/*.dat > list_file.dat
but what i am getting is:
$ ls /export/home/user/*.dat > list_file.dat
/export/home/user/*.dat: No such file or directory
But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies
4. UNIX for Advanced & Expert Users
BASH shell:
I'm trying to create a copy of the /etc/passwd file named "./copy-passwd" that contains only the entries for userids that have a home directory in /home/inst, and then change each entry in the copy so that the default login shell is /bin/sh.
Would "sed" be the best choice of file... (1 Reply)
Discussion started by: raidkridley
1 Replies
5. UNIX for Dummies Questions & Answers
unix program to which a directory name will be passed as
parameter. This directory will contain files with various
extensions. This script will create directories with the names of the
extention of the files and then put the files in the
corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies
6. Shell Programming and Scripting
Hi,
I am having a file which is fix length and comma seperated. And I want to replace values for one column.
I am reading file line by line in variable $LINE and then replacing the string.
Problem is after changing value and writing new file temp5.txt, formating of original file is getting... (8 Replies)
Discussion started by: Mruda
8 Replies
7. Shell Programming and Scripting
Hi,
I am quite new to Perl scripting and i need to create a .TXT file using perl, with fields (A,B,C,D,E), and this text file should be named with current file creation date "XYZ_CCYYMMDD.TXT" (i.e.XYZ_2011042514:33 PM).
Can anyone who has done this, please share their expertise on this... (5 Replies)
Discussion started by: msrahman
5 Replies
8. Shell Programming and Scripting
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies
9. Shell Programming and Scripting
I have a text file that has data like:
Data "12345#22"
Fred
ID 12345
Age 45
Wilma
Dino
Data "123#22"
Tarzan
ID 123
Age 33
Jane
I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes:
Data "1012345#22"
Fred
ID... (16 Replies)
Discussion started by: say170
16 Replies
10. Shell Programming and Scripting
I have a text file with contents like this:
a,b,c,
d~e,f,g,h~i,j
,k,l,m~n,o,p,q~
I need to convert this file into this format unix shell script commands:
a,b,c,d~
e,f,g,h~
i,j,k,l,m~
n,o,p,q~
as you may have noticed, I need to retain the ~ signs at the end.
Any help is greatly... (3 Replies)
Discussion started by: harsha1238
3 Replies
LEARN ABOUT HPUX
transmission-edit
TRANSMISSION-EDIT(1) BSD General Commands Manual TRANSMISSION-EDIT(1)
NAME
transmission-edit -- command-line utility to modify .torrent files' announce URLs
SYNOPSIS
transmission-edit [-h] [-a url] [-d url] [-r search replace] torrentfile(s)
DESCRIPTION
transmission-edit command-line utility to modify .torrent files' announce URLs
OPTIONS
-h --help
Show a short help page and exit.
-a --add URL
Add an announce URL to the torrent's announce-list if it's not already in the list
-d --delete URL
Remove an announce URL from the torrent's announce-list
-r --replace search replace
Substring search-and-replace inside a torrent's announce URLs. This can be used to change an announce URL when the tracker moves or
your passcode changes.
EXAMPLES
Update a tracker passcode in all your torrents:
$ transmission-edit -r old-passcode new-passcode ~/.config/transmission/torrents/*.torrent
AUTHORS
Jordan Lee
SEE ALSO
transmission-create(1), transmission-daemon(1), transmission-edit(1), transmission-gtk(1), transmission-qt(1), transmission-remote(1),
transmission-show(1)
http://www.transmissionbt.com/
BSD
June 9, 2010 BSD