10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i have a file with multiple entries. After some tests with sed i managed to get the file output as follows:
lsn=X-LINK-IN0,apc=661:0,state=avail,avail/links=1/1,
00,2110597,2094790,0,81,529,75649011,56435363,
lsn=TM1ITP1-AM1ITP1-LS,apc=500:0,state=avail,avail/links=1/1,... (5 Replies)
Discussion started by: nms
5 Replies
2. Shell Programming and Scripting
i want to append line 1 of file1
to the beginning of line1 of file2 and keep existing txt
i have tried this sed
sed -n '1p' file1 >> file2
but that goes to line 2
example
file1 looks like this
jump
file2 should look like this
jump over
i would to do this by line number as... (10 Replies)
Discussion started by: bob123
10 Replies
3. Shell Programming and Scripting
Hi,
Need to add sequnce number to one of the csv file and please find below
actual requirement.
Input file
ABC,500
XXQ,700
ADF,400,
ART,200
Out put file should be
1,ABC,500
2,XXQ,700
3,ADF,400,
4,ART,200 (3 Replies)
Discussion started by: siva83
3 Replies
4. UNIX for Dummies Questions & Answers
awk 'BEGIN{FS = "Ç"}
NR == 1 {p = $0; next}
NF > 1 {print p; p = $0}
NF <= 1 {p = (p " " $0)}
END {print p}' input.txt > output.txt
This is what the input data file looks like with broken lines
Code:
29863 Ç890000000 Ç543209911 ÇCHNGOHG
Ç000000001 Ç055 ... (4 Replies)
Discussion started by: cumeh1624
4 Replies
5. Shell Programming and Scripting
Hello everyone,
I don't really know anything about scripting, but I have to manage to make this script, out of necessity.
#!/bin/bash
while read -r line; do #I'm reading from a big wordlist
instructions using $line
done
Is there a way to automatically write the $line number the script... (4 Replies)
Discussion started by: bobylapointe
4 Replies
6. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
7. Shell Programming and Scripting
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies
8. Shell Programming and Scripting
Hi I have used many times the various methods to append two lines together in a file.
This time I want to append the 1st line to the second and repeat for the complete file.... an example
This is the file
owns the big brown dog
joe
owns the small black dog
jim
What I want is
... (7 Replies)
Discussion started by: dwalley
7 Replies
9. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies
10. Shell Programming and Scripting
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)
Discussion started by: chiru_h
2 Replies
bntext(5) File Formats Manual bntext(5)
NAME
bnmotd.txt, bnnews.txt bnissue.txt - messages for the Unix Battle.net daemon
DESCRIPTION
The file bnmotd.txt contains text displayed by bnetd(1), when users first log into the server.
The file bnnews.txt contains text displayed when the user uses the /news chat command.
The files consist of raw text with printf-style formatting escapes. Each line of a file can contain a type formatter from the following
list:
%B Use the broadcast attribute (???).
%C Execute the line as if the user entered it as a command.
%E Use the error attribute (red).
%I Use the info attribute (yellow). This is the same was %W.
%M Normal chat message (white). This will appear as if the user said it.
%T Emote chat message (???). This will appear as if the user said it.
%W Use the warning attribute (yellow). This is the same was %I.
Within a line, any of the following format formatters may be used:
%% Expand to a literal percent sign (%).
%a Expand to the number of accounts on the server.
%c Expand to the number of channels on the server. This includes all permanent and current temporary channels.
%g Expand to the number of games on the server. This includes both public and private (passworded) games.
%h Expand to the hostname of the server (as returned by gethostname(2)).
%i Expand to this user's account ID number, formatted with a leading pound (#) sign and leading zeros.
%l Expand to this user's current chat name which is usually the same
%r Expand to the IP of the remote machine (the client).
%t Expand to four character client tag.
%u Expand to the number of users logged into the server.
%v Expand to the version number of the server.
SEE ALSO
bnetd(1)
AUTHOR
Ross Combs (ross@bnetd.org)
2 August, 2001 bntext(5)