12-12-2018
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to write a shell script which combines/joins 3 text files into one file. Do i put the txt files in the same folder as my script? Here is what i have:
#!/bin/bash
file1=$1
file2=$2
file3=$3
out="output.txt"
count=0
if
then
echo "$(basename $0) file1 file2 file3"
... (3 Replies)
Discussion started by: zzthejimzz
3 Replies
2. Shell Programming and Scripting
eg.
file 1 has:
4 0 8628380 653253 0 0 0 0 0 0
2 0 8626407 655222 0 0 0 0 0 0
4 0 8633729 647892 0 0 0 0 0 0
5 0 8646253 635367 0 0 0 0 0 0
file 2 has:
4798 48717 11554
5408 56487 14359
6010 58415 15220
5541 41044... (2 Replies)
Discussion started by: netbanker
2 Replies
3. Shell Programming and Scripting
hi people;
this is my file1.txt:192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
...
this is my file2.txt:portnames
usernames
maxusercap
...
i want to write to file3.txt:l ./getports 192.168.1.1 'get all;l+;get . portnames;l-'
l ./getports 192.168.1.1 'get all;l+;get . usernames;l-'... (4 Replies)
Discussion started by: gc_sw
4 Replies
4. Shell Programming and Scripting
Hi Freinds
I have two .txt file gem1.txt and gem2.txt,
Sample gem1.txt
abstract (1.0.0)
actionmailer (2.3.5, 2.2.2)
actionpack (2.3.5, 2.2.2)
activerecord (2.3.5, 2.2.2)
activerecord-oracle_enhanced-adapter (1.1.9)
activerecord-sqlserver-adapter (2.3.4)
activeresource (2.3.5, 2.2.2)... (3 Replies)
Discussion started by: ankit_view24
3 Replies
5. Shell Programming and Scripting
Hi Guys,
I want to combine 2 files and and put together in 1 file and make two columns out it. See below desired output. Any help will be much appreciated.
inputfile1.txt
12345
67890
24580
inputfile2.txt
AAAAA
BBBBB
CCCCC (11 Replies)
Discussion started by: pinpe
11 Replies
6. Emergency UNIX and Linux Support
Hi Ppl,
I have a requirement like i will be getting files of huge size daily and if the file size is so huge ,the files will be split into many parts and sent.The first file will have the header details followed by detail records and the consecutive files will have detail records and the last... (11 Replies)
Discussion started by: ganesh_248
11 Replies
7. Shell Programming and Scripting
I am trying to combine 4 .dat files into one single Output file
Inputs are:- file123.dat, file256.dat, file378.dat & file490
Expected Output:-
FileName=file1
{text from file1}
EOF
{blank line}
FileName=file2
{text from file2}
EOF
{blank line}
FileName=file3
{text from file3}
EOF... (4 Replies)
Discussion started by: lancesunny
4 Replies
8. Shell Programming and Scripting
Hi,
How can I combine the data of of three files into one new file?
I try to give as much informations as possible.
The three existing files are called file1 file2 and file3
the new file should named output_combined.
The size of the files will be around 900 words/lines each .. but always... (5 Replies)
Discussion started by: MyMemberName
5 Replies
9. How to Post in the The UNIX and Linux Forums
Hi Guys,
Can anyone provide the solution /commands to combine the files which are in two different linux servers into a file.
Thanks,
Reminisce (1 Reply)
Discussion started by: reminisce
1 Replies
10. Shell Programming and Scripting
Hi Guys,
Can anyone please suggest the commands to combine two files data from two different linux servers .
Reminisce (3 Replies)
Discussion started by: reminisce
3 Replies
LEARN ABOUT CENTOS
utmpdump
UTMPDUMP(1) System Administration UTMPDUMP(1)
NAME
utmpdump - dump UTMP and WTMP files in raw format
SYNOPSIS
utmpdump [-frh] [ filename ]
DESCRIPTION
utmpdump is a simple program to dump UTMP and WTMP files in raw format, so they can be examined. utmpdump eads from stdin unless a file-
name is passed.
OPTIONS
-f, --follow
Output appended data as the file grows.
-r, --reverse
Undump, write back edited login information into utmp or wtmp files.
-h, --help
Print a help text and exit.
-V, --version
Output version information and exit.
NOTES
utmpdump can be useful in cases of corrupted utmp or wtmp entries. It can dump out utmp/wtmp to an ASCII file, then that file can be
edited to remove bogus entries and reintegrated, using
utmpdump -r < ascii_file > wtmp
but be warned as utmpdump was written for debugging purpose only.
BUGS
You may not use the option -r as the format for the utmp/wtmp files strongly depends on the input format. This tool was not written for
normal use but for debugging.
AUTHOR
Michael Krapp
SEE ALSO
last(1), w(1), who(1), utmp(5)
AVAILABILITY
The utmpdump command is part of the util-linux package and is available from Linux Kernel Archive <ftp://ftp.kernel.org/pub/linux/utils
/util-linux/>.
util-linux July 2012 UTMPDUMP(1)