sed/awk script to replace only FIRST comment in the file
My first comment on every file contains the license message. I want to replace with a new license message. I used the below sed script, which replaces all comments. What is the modification or any other method with awk script for the below to edit only the first comment(license message)?
#sed -f sedscript filename
sedscript:
Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.
Last edited by Corona688; 09-09-2012 at 03:53 PM..
Reason: Make the question more specific
Hi there,
may someone easily help me on this :
I want to insert a text in a specific line number like :
linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1`
line2insert=`expr $linenumb2start + 2`
and now I need to replace something like {} with {comment} at... (8 Replies)
Hi Everyone,
I am new to this forum and new to sed/awk programming too !!
I need to find particular string in file1(text file) and replace it with a value from another text file(file2) the file2 has only one line and the value to be replaced with is in the second column.
file 1:
(assert (=... (21 Replies)
Can you please point me in the correct direction?
I need a line or script to run though a given directory and find all files with "@domain.local" in there names and simple remove that.
For example if the files were named 1234@domain.local the file would then become 1234. (1 Reply)
My apologies if this has been answered in a previous post. I've been doing a lot of searching, but I haven't been able to find what I was looking for. Specifically, I am wondering if I can utilize sed and/or awk to locate two strings in a file, and replace everything between those two strings... (12 Replies)
Hi experts,
In my text file I have the following alot of lines like below.
input.k is as follows.
2684717 -194.7050476 64.2345581 150.6500092 0 0
2684718 -213.1575623 62.7032242 150.6500092 0 0
*INCLUDE
$# filename... (3 Replies)
my file has thousands of line but let me show what i want to achieve... here is one line from that file
cat fileName.txt
(2,'','user3002,user3003','USER_DATA_SINGLE',1,0,0,'BACKUP',2,NULL,0,450,NULL,NULL,'','2011-05-10... (13 Replies)
Dear All,
I am having a requirement to find the difference between 2 files and generate a discrepancy report out of it as an html page. I prefer using diff -y file1 file2 since it gives user friendly layout to know any discrepancy in the record and unique records among the 2 file. Here's how it... (12 Replies)
The requirement is i need to find an array value matching with pattern {5:{ , replace that with 5: and reassign that to same array index and print it.
I write something like below and the issue is sed command is not working. If i replace " with "`" the script gives syntax error.how can i... (8 Replies)
Hello,
I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Hi All
I have one file with multiple lines in it, each line has static text and some variable enclosed in <<filename>> as well. e.g. as below
123, <<file1.txt>> this is my name, I stay at <<city.txt>> Thanks for visiting
348384y, this is my name <<fileabc.txt>>, I stay at near the mall of... (8 Replies)
Discussion started by: reldb
8 Replies
LEARN ABOUT DEBIAN
nicovideo-dl
NICOVIDEO-DL(1) General Commands Manual NICOVIDEO-DL(1)NAME
nicovideo-dl -- download a video file from www.nicovideo.jp
SYNOPSIS
nicovideo-dl [options] video_url
DESCRIPTION
This manual page documents briefly the nicovideo-dl command.
This manual page was written for the Debian distribution because the original program does not have a manual page.
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below.
-h--help
print this help text and exit
-u USERNAME --username=USERNAME
account username (e-mail address)
-p PASSWORD --password=PASSWORD
account password
-o FILE --output=FILE
output video file name
-q--quiet
activates quiet mode
-s--simulate
do not download video
-t--title
use title in file name
-l--literal
use literal title in file name
-n--netrc
use .netrc authentication data
-g--get-url
print final video URL only
-2--title-too
used with -g, print title too
-c--get-comment
download comment
-x--raw-comment
save comment in raw xml
--comment-output=FILE
output comment file name
-v--version
print program version and exit
SEE ALSO
youtube-dl (1).
AUTHOR
This manual page was written by paulliu grandpaul@gmail.com for the Debian system (but may be used by others). Permission is granted to
copy, distribute and/or modify this document under the same terms as the license of the original software.
NICOVIDEO-DL(1)