Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Hi Friends,
I am new to this forum. Just struck up with a logic.
I have a csv file seperated by ":" (colons).
This csv file contains hostname and groups as follows:
HOSTNAME:VT Group
SGSGCT2AVPX001:Team1
SGSGCT2AVPX003:Team2
SGSGCT2AVPX005:Team2
PHMNCTTAVPX001:Team3
I want to... (2 Replies)
Hi All,
Need help on this
I have 2 files
one file file1 which has several entries as :
define service{
hostgroup_name !host1,!host5,!host6,.*
service_description check_nrpe
}
define service{
hostgroup_name !host2,!host4,!host6,.*
service_description check_opt
}
another... (2 Replies)
I have made a script something like this. I want it to read the contents of either file or directory but 'cat' and 'ls' is not working. Can anyone help me? I am a newbie in scripting so dont know much about it. I also dont know how can i put my code separatly on this forum
#!/bin/bash
echo... (9 Replies)
Hi, I'm trying to implement a C program on ubuntu which reads the contents of a file that is passed in as an argument and then displays it to the screen. So far I've cobbled together this from bits online but most of it is probably wrong as its all copied and pasted...
#include <stdio.h>... (2 Replies)
Hi Friends,
I have a file1 with 5 columns
a b c d e
f g h i j
I have file2 with 3 columns
1 2 3
4 5 6
I want to replace 3rd 4th and 5th columns in file1 with file2 contents, so the output would be
a b 1 2 3
f g 4 5 6
Thanks (6 Replies)
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
How can i replace the contents in a particular line of a file.
<FOLDERMAP SOURCEFOLDERNAME="FFCB-2012" SOURCEREPOSITORYNAME="Repo_DEV" TARGETFOLDERNAME="TEST" TARGETREPOSITORYNAME="Dev_Repo"/>
For Example I want to replace the SOURCEREPOSITORYNAME="Repo_DEV" to... (3 Replies)
Like to have shell script to Read the given file contents into a merged one file with header of path+file name followed by file contents into a single output file.
While reading and merging the file contents into a single file, Like to keep the format of the source file.
... (4 Replies)
Discussion started by: Siva SQL
4 Replies
LEARN ABOUT DEBIAN
tsk_comparedir
TSK_COMPAREDIR(1) General Commands Manual TSK_COMPAREDIR(1)NAME
tsk_comparedir - compare the contents of a directory with the contents of an image or local device.
SYNOPSIS
tsk_comparedir [-vV] [-n start_inum ][ -i imgtype ][ -b dev_sector_size ][-o sector_offset ] image comparison_directory
DESCRIPTION
tsk_comparedir compares the contents of image to the contents of comparison_directory. This can be useful for detecting rootkits and when
testing. Rootkits can be detected by comparing the contents of a local directory and a local raw device. The rootkits typically don't
hide data when it is read directly from the raw device.
The arguments are as follows:
-o sector_offset
Sector offset for a partition in the image or device to compare with.
-n start_inum
Starting inum for a directory in the image to start the comparison at.
-v verbose output to stderr
-V Print version
-i imgtype
The format of the image file (use '-i list' for supported types) If not given, autodetection methods are used.
-b dev_sector_size
The size (in bytes) of the device sectors If not given, autodetection methods are used.
EXAMPLES
To compare the directories in image.dd to those in directory:
# tsk_comparedir ./image.dd ./directory
AUTHOR
Brian Carrier <carrier at sleuthkit dot org>
Send documentation updates to <doc-updates at sleuthkit dot org>
TSK_COMPAREDIR(1)