Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: sharadpisal
1,577
Posted By sharadpisal
if it is about removing lines from one file which...
if it is about removing lines from one file which are there in another file comm command can help you, bit it works on sorted files. read 'man comm' to check
5,969
Posted By sharadpisal
Way to find out pid of last process run in...
Way to find out pid of last process run in background

$ sleep 10 &
[1] 19959
$ echo $!
19959
29,596
Posted By sharadpisal
ok .. now there is one more thing we might need...
ok .. now there is one more thing we might need to do while doing things in parallel.

suppose there 4 commands
cmd1,cmd2, cmd3, cmd4

goal is :
run cmd1 and cmd2 in parallel, once both are...
1,716
Posted By sharadpisal
i would use perl to do that.
i would use perl to do that.
Forum: Solaris 06-14-2010
1,788
Posted By sharadpisal
find command can help you option of your...
find command can help you

option of your interest : -mmin and -mtime
1,556
Posted By sharadpisal
if x is the desired output, Add some number , say...
if x is the desired output, Add some number , say N in the output and try to check id the final output is x+N :)

as
'1' + 1 = '2'
and is also
' 1 ' + 1 = '2'
5,708
Posted By sharadpisal
camel book has example which says count number of...
camel book has example which says count number of stars in sky

Perl Pattern Matching (http://www.sarand.com/td/ref_perl_pattern.html)
1,799
Posted By sharadpisal
Create a file with some name, say converter.pl...
Create a file with some name, say converter.pl with content like,

#!/usr/bin/perl -w
use strict;

my @keyList = qw (edge100 BroadLeaves Conifers clc2006 slope aspect dem30sec);

print join...
1,799
Posted By sharadpisal
well not sure about awk, but it would be very...
well not sure about awk, but it would be very easy with perl.
are you interested in knowing the soln?
1,484
Posted By sharadpisal
sed -i -e 's/__HOSTNAME__/$HOSTNAME/g' filename ...
sed -i -e 's/__HOSTNAME__/$HOSTNAME/g' filename

where '__HOSTNAME__' will be place holder in the file

-i for inpalce editing
3,337
Posted By sharadpisal
use perl, its better
use perl, its better
5,244
Posted By sharadpisal
yes.. as & will make comamnd to run in back...
yes..

as & will make comamnd to run in back ground ... so control will come to next line .. before the earlier one is finished .. and wait at the end will make parent script to wait for all child...
1,987
Posted By sharadpisal
you wont be able to use this script in automated...
you wont be able to use this script in automated jobs, as it needs inputs from user.

how about making this script to take argument on command line, rather than having it interactive ?
21,861
Posted By sharadpisal
it should be echo "echo \" somthing\" " > ...
it should be echo "echo \" somthing\" " > $file
2,059
Posted By sharadpisal
try to search about content-type :text/html
try to search about
content-type :text/html
6,973
Posted By sharadpisal
its a 'script', parsed line by line. you wont...
its a 'script', parsed line by line.
you wont find error until line is parsed or EOF is reached searching for expected line
14,521
Posted By sharadpisal
DOS command ? I could not find ren on my...
DOS command ?
I could not find ren on my system, tried to search and Google/wiki said its dos command
14,521
Posted By sharadpisal
Its more about knowing how '*' works, rather than...
Its more about knowing how '*' works, rather than mv command

if ur directory contains two .DAT files, F1.DAT and F2.DAT, and one TXT file, F.txt

actual command getting fired will be
mv...
Forum: Red Hat 08-31-2009
12,636
Posted By sharadpisal
from perldoc -f flock Two potentially...
from perldoc -f flock

Two potentially non-obvious but traditional flock semantics are that it waits indefinitely until the lock is granted, and that its locks merely advisory. Such...
Forum: Red Hat 08-31-2009
12,636
Posted By sharadpisal
Well when you say file is locked .. all it means...
Well when you say file is locked .. all it means is, its is locked for those who care for it,

e.g.
If I want to lock a file x, ill create file x.lock in particular location.
now when you come...
10,468
Posted By sharadpisal
if : input file of : output file ibs :...
if : input file
of : output file
ibs : tell how many bytes to read at a time, something like block size
count: read those blocks for maximum of this times,

so


# dd if=infile ibs=N...
6,302
Posted By sharadpisal
tar -czvpf file.tar.gz <directory> 'p' in...
tar -czvpf file.tar.gz <directory>

'p' in option can help you
3,597
Posted By sharadpisal
perhaps you want lines which contains '[kmem_' ? ...
perhaps you want lines which contains '[kmem_' ?

---------- Post updated at 08:20 PM ---------- Previous update was at 08:19 PM ----------

or rather the one which includes 'Total [kmem_' ?
25,285
Posted By sharadpisal
Was not sure if its always going to be 4 char long
Was not sure if its always going to be 4 char long
4,058
Posted By sharadpisal
s = echo $EachRecord | cut -d " " -f1 p = echo...
s = echo $EachRecord | cut -d " " -f1
p = echo $EachRecord | cut -d " " -f2

it should be
s=`echo $EachRecord | cut -d " " -f1`
p=`echo $EachRecord | cut -d " " -f2`

note: no spaces around...
Showing results 1 to 25 of 40

 

Featured Tech Videos

All times are GMT -4. The time now is 02:58 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy