i have a directory which consist of multiple files out of which there are some files that has -e in their name.
I want to write a script that will change all those file-name to -l
example there are some files with name :
Code:
file1-e.wav
file2-e.wav
file3-english-e.wav
file-4-e.wav
expected output
Code:
file1-l.wav
file2-l.wav
file3-english-l.wav
file-4-l.wav
Hi,
I have 2 files as below
FILE1.dat
Code:
co1|co2|co3
abnd|45.56|AZ
dkny|30.2|PA
sam|.23|VA
FILE.CTL
Code:
FILENAME|FILE1.dat
NO OF RECORDS|3
CHECKSUM|75.99
Could you please help me to write a shell script to compare
1. TOTAL RECORDS from FILE1.dat with NO of RECORDS in FILE.CTL
2.
I searched a lot considering this theme,but still cant make my code working.
I have two tab separated files, I want to do the following thing:
File 1:
Code:
xx1 y yy
xx2 y yy
xx3 y yy
xx4 y yy
File 2:
Code:
xx1 z1
xx2 z2
xx3 z3
xx4 z4
xx5 z5
So I want to merge them ,according to the first column and receive:
File 3:
Code:
xx1 y yy z1
xx2 y yy z2
xx3 y yy z3
xx4 y yy z4
i am working on a shell script and need help in the comparing part of it. for e.g.
Hi experts,
I am trying to compare two text files and output the difference to another file.
I'm not strictly looking for differences in text but additional text at the end of one file that isn't in another, so basically comparing the file 2 against file 1 and printing any additional text to file 3.
Code
Code:
# Tool number
toolnr=`uname -n | cut -c2-`
# Log Directory Path
LOG_path="/
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to append the data. but i am seeing junk characters in between.
Hello, guys!
I want to find difference between two file according $1. I using the following code, but get wrong results.
Code:
awk -F, 'NR==FNR{A[$1]=$0; next} $1!=A[$1]' file1 file2
I can using the following code get same record between files.
Hi,
I have two files.
Code:
cat file.txt
a
b
c
d
cat file1.txt
j
k
l
m
I need the output as
a:j
b:k
c:l
d:m
I tried the script but not working
Code:
cat test1.sh
#!/bin/sh
for i in `cat file1` ; do
N=0
j=`cat file2`
N=$((N+1))
echo $i:$j >>test2
done
i am working on a shell script and need help in the comparing part of it. for e.g.