10 More Discussions You Might Find Interesting
1. Programming
Dear All
I have 200 data files and each files has many duplicates.
I am looking for the automated awk script such that it checks and removes the duplicates from the each file and saving them as new files for all 200 files in the respective folder.
For example my data looks like this..
... (12 Replies)
Discussion started by: bala06
12 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is there a way to write to a txt file each day but retain the header on the file? I'm cat'ing 5 files into one .txt file each day but I want the new data to be written after the first 2 lines which are:
Progname Size Date Owner
----------------------------
Basically I want my new... (4 Replies)
Discussion started by: Grueben
4 Replies
3. Shell Programming and Scripting
Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies
4. Shell Programming and Scripting
Hello Firends
I have a file that contains data within single quotes, which has meaning of its own. When I am trying to parse through the file for a different functionality I noticed that I was loosing the backslash when occurrences in the file look like ('\0'). I would want to retain the... (3 Replies)
Discussion started by: easwam
3 Replies
5. Shell Programming and Scripting
I have large file with around 100k+ lines. I wanted to retain only the last 100 lines in that file. One way i thought was using
tail -1000 filename > filename1
mv filename1 filename
But there should be a better solution.. Is there a way I can use sed or any such command to change the... (9 Replies)
Discussion started by: nss280
9 Replies
6. Shell Programming and Scripting
There are directories of files that I have to run the dos2ux command on to get ride of the carriage return characters. Easy enough, but I have to retain the original timestamps on the files. I am thinking that I am going to have to strip off the timestamp for each file and convert it to unix time... (3 Replies)
Discussion started by: scotbuff
3 Replies
7. UNIX for Advanced & Expert Users
I want to retain specific number of backup files in a directory.for example i want to retain only two latest backup file in backup directory. If number of backup files is greater than this policy that it will delete oldest file.Please Tell me whether this is possible or not. (2 Replies)
Discussion started by: ranvijaidba
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I am using Bash shell to create some data and these data would be piped out to a file, let say output.txt.
This output.txt I would like to add some extra header information such as comments, descriptions and general information on the text.
I would like to know how could I maintain... (0 Replies)
Discussion started by: ahjiefreak
0 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I am trying to ftp a file :
-rw-rw-rw- 1 oraclepbdw dba filename.txt
from Machine A ( where umask is 022) to Machine B (umask 022)
but the file changes to
-rw-rw-r-- 1 ftpamle3 ftaml filename.txt
Dur some constraints the group of the users on either side... (3 Replies)
Discussion started by: gauravsachan
3 Replies
10. Shell Programming and Scripting
Hi,
I'm working on a little script, for first I transformed epoch (unix date in seconds) in a human readable date in this way
cat arp.dat | sort -k 3 | gawk '{ print strftime("%d:%m:%Y:%H:%M", $3),$1,$2}'
the result is
06:03:2006:10:01 0:a:e4:c0:b5:6d 192.168.1.3
06:03:2006:12:15... (8 Replies)
Discussion started by: CM64
8 Replies