09-12-2009
Yes, I am making use of the new concept I have learnt from you.
Thanks again Sanjay!
10 More Discussions You Might Find Interesting
1. Solaris
I need to copy the files from one dir to another dir based on sysdate, like
cp -> (sysdate-n) filename -> to -> new dir
n = 1,2,3.............. (3 Replies)
Discussion started by: dbasan
3 Replies
2. Shell Programming and Scripting
I want to capture contents of a file between 2 strings into another file
for eg all lines in between the keywords "start log" and "end log" should be copied into another file (4 Replies)
Discussion started by: misenkiser
4 Replies
3. Shell Programming and Scripting
Hi everybody:
I try to print in new file selected lines from another file wich depends on the first column.
I have done a script like this:
lines=( "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "21" "31" "41" "51" "55" "57" "58" )
${lines}
for lines in ${lines}
do
awk -v ... (6 Replies)
Discussion started by: tonet
6 Replies
4. UNIX for Dummies Questions & Answers
I wonder if someone would help me a little here.
I have a directory (folder on a mac) with about 100 subfolders and sub-subfolders and files there in. All sub directories have the same name structure, "AAA Name". Like this:
ISP CompanyName
ITS CompanyName
KEL CompanyName
KRA CompanyName... (2 Replies)
Discussion started by: sigurarm
2 Replies
5. UNIX for Dummies Questions & Answers
I am wanting to find files within a directory that are over a certain number of days old and copy them to another directory. And unfortunately not having much luck.......is someone able to help.
Would also like to add that there are literally thousands of files that I am wanting to copy in one... (3 Replies)
Discussion started by: hellfyre
3 Replies
6. Shell Programming and Scripting
I have an if statement where I state that if there are more than one records (lines) found containing a string in a file, then it enters into a while loop to use each line for as many lines as there are and then stop.
Trouble is, I can't figure out how to move to the next instance of each line. ... (2 Replies)
Discussion started by: derekphl
2 Replies
7. Shell Programming and Scripting
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
Discussion started by: ananyob
3 Replies
8. Shell Programming and Scripting
Hello,
I have a file, which looks like:
I want to print the row containg "PRO" in second column after comparing and finding the minimum value of fifth column present in all "PRO". and likewise for every other string present in second column.
I am using :
filename=list... (2 Replies)
Discussion started by: CAch
2 Replies
9. Shell Programming and Scripting
hi Gurus,
I have a source file with more than 10 columns ( not fixed )
I want to delete all the lines on the following condition
1) where i have first column as "UPDATE PLAN ADD RATE SCHEDULE" and fourth column as null
awk '($1=="UPDATE PLAN ADD RATE SCHEDULE" && $4=="") {print $0}'... (5 Replies)
Discussion started by: r_t_1601
5 Replies
10. Shell Programming and Scripting
two files: one with the line number only, and the 2nd one with line number and content, as following:
line_file.txt
1
3
5
9
23
30
content_file.txt
1|we are the world|good|great
2|easily do this by highlighting you|easily do this by highlighting you|easily do this by highlighting... (2 Replies)
Discussion started by: dtdt
2 Replies
MKILL(8) The SuSE boot concept MKILL(8)
MKILL
Mkill - Send processes making a active mount point busy a signal
SYNOPSIS
mkill [-SIG] [-u] /mnt1 [/mnt2...]
mkill [-l]
DESCRIPTION
mkill determines all active mount points from /proc/mounts and compares this with the specified mount points. Then mkill seeks for pro-
cesses making this mount points busy. For this search only the links found in /proc/<pid>/ are used to avoid hangs on files provided by
network file systems like nfs(5). The default signal is SIGTERM for termination. If a mount point is not active, that is that it is not
found in /proc/mounts, mkill will do exactly nothing.
OPTIONS
-<SIG> Signals can be specified either by name (e.g. -HUP, -SIGHUP) or by number (e.g. -1).
-0 The special signal 0 force mkill to list all processes making the specified mount point busy.
-u Perform a lazy umount on the specified mount points before sending the signal SIGTERM or SIGKILL.
-l List all known signals.
EXAMPLES
mkill -TERM /var
This will terminate all processes accessing a seperate /var partition.
mkill -HUP /dev/pts
All processes using a pseudo-terminal slave will hangup.
RETURN VALUE
Always success which is that zero is returned.
SEE ALSO
fuser(1), proc(5), umount(8).
COPYRIGHT
2008 Werner Fink, 2008 SUSE LINUX Products GmbH, Germany.
AUTHOR
Werner Fink <werner@suse.de>
3rd Berkeley Distribution Jan 31, 2008 MKILL(8)