Hi all, I'm needing help again on scripting.
Is there a way to use the "paste" command to combine files and have each line key off of a column? All this time I've been pasting files together and foolishly not checking the line count of each file. I have just found out that the line count is not the same for each file so the data is not being synchronised properly across the two files.
Hi All,
My requirement is to remove the more than 60 days files from Archive folder, so prepared this command.
Code:
for files in `find /abc/Archive/<file_name_25032012.dat> -type f -mtime 61|xargs ls -lrt`
do
rm -f $files
done
I tested this command in both unix and informatica.
In unix if files are exists on this date then it's identifying files and removing else it's removing
I recently installed Rhythmbox (version 2.90.1) in my system running Ubuntu 11.10. I've discovered lthough I can play the uri's linking to .m3u and .pls files for radio streams in the GUI, they do not work in the command line. Instead I have to download the .m3u & .pls files to get the uri inside those files and use that as the argument instead when running from command line.
Hi Everyone
I am new to Unix shell scripting
Can anyone please explain me in detail how this command works
Code:
awk -F@ 'NR==FNR{A[$1]=$2;next}$3 in A{$3=A[$3]}1' file2 file1
The above command I got it from this forum, but unable to implement it as I am not getting how this works:mad:
I have two files abc.txt and xyz.txt
abc.txt
Code:
1,2,3,4
5,6,7,8
9,0,1,2
xyz.txt
Hi,
I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt.
I need to compare 2 files. Column 1 is the same in both files. Column 2 is what I want to compare: I want all lines in file 1 that are not in file 2 when comparing column 2. Column 3 is different in both files, even for lines where column 1 and 2 are identical.
So I have a bunch of text files which look like this:
T1
r1 a b c d
r2 d e f g
...
T2
r1 h i j k
r2 l m n o
...
And I want to make FOUR different text files in the following format:
__ T1 T2 ...
r1 a h ...
r2 d l ...
__ T1 T2 ...
r1 b i ...
r2 e m ...
So basically, I have a certain number of files.
I have some tab delimited data files with different column numbers. I want to add a header line to these files, the header line only contains 'ID' in the first column, however, the total column number of the header line should be the same as the file. Can I do it with some linux commands? Thank you very much!!