Hello, I need help in appending the line number of each line to the file and also to get the total number of lines. Can somebody please help me.
I have a file say:
abc
def
ccc
ddd
ffff
The output should be:
Instance1=abc
Instance2=def
Instance3=ccc
Instance4=ddd
Instance5=ffff
... (2 Replies)
Hi. Is there a way in awk to show all lines between a line number and the next line containing a particular regex? We can do these, of course:
awk '/regex1/,/regex2/' filename
awk 'FNR > X && FNR < Y' filename
But can they be combined? Thanks. (3 Replies)
I have a code here , which should display lines 6,10,14,18,35 of a text file
#!/bin/ksh
line=6
line=10
line=14
line=18
line=35
for i in 1 2 3 4 5
do
val=`echo ${line}`
act=`awk 'NR~/^($val)$/' db_CHECKOUT.txt`
done;
This code is not working. The purpose of the line below is... (3 Replies)
Hello
Wondering if anybody can advise me how I can sort the below file so it only displays lines with the latest versions of an object? As you'll see some of the scripts listed in my file have more than one version number (version number is after the file extension). E.g. cdm_bri.pkb has... (2 Replies)
Hi ,
1)i want to display specific line number using tail command.
e.g. display 10 line from end.
Please help...
2)Want to display line 10 to 15 (from end)using tail command) (2 Replies)
a. How do I display the content of the file containing what Ive merged using a filter which would display only the lines of the file which don't contain number, for example 3 or 6. (3 Replies)
Hi all
Thanks in advance...........
Please help me for this issue............
I have a file it has 11 records . I used the command like ....
>$ wc -l file
11 file
I'm getting output like 11 file (no.of records along with filename)
here my requirement is, I want to display only... (3 Replies)
awk 'BEGIN{IGNORECASE=1} /error|warning|exception/ { ++x } END { print x }' filename
The above command returning the number of times the pattern present in the file. But I want the the line number as well. please help me out (6 Replies)
I pass a number to my script. Passing "1" below.
./getfile.sh 1
echo "User entered: $1"
ls -ltr *.conf | sed -n '$p'
I wish to use ls -ltr i.e list files in ascending order of time the latest showing at the bottom of the output.
Number 1 should get me the last row of ls -ltr output i.e... (9 Replies)
Discussion started by: mohtashims
9 Replies
LEARN ABOUT DEBIAN
yaz-url
YAZ-URL(1) Commands YAZ-URL(1)NAME
yaz-url - YAZ URL fetch utility
SYNOPSIS
yaz-url [-H name:value] [-m method] [-O fname] [-p fname] [-u user/password] [-x proxy] [url...]
DESCRIPTION
yaz-url is utility to get web content. It is very limited in functionality compared to programs such as curl, wget.
The options must be precede the URL given on the command line to take effect.
Fetched HTTP content is written to stdout, unless option -O is given.
OPTIONS -H name:value
Specifies HTTP header content with name and value. This option can be given multiple times (for different names, of course).
-m method
Specifies the HTTP method to be used for the next URL. Default is method "GET". However, option -p sets it to "POST".
-O fname
Sets output filename for HTTP content.
-p fname
Sets a file to be POSTed in the folloing URL.
-u user/password
Specifies a user and a password to be uesd in HTTP basic authentication in the following URL fetch. The user and password must be
separated by a slash (this it is not possible to specify a user with a slash in it).
-x proxy
Specifies a proxy to be used for URL fetch.
SEE ALSO yaz(7)YAZ 4.2.30 04/16/2012 YAZ-URL(1)