Search Results

Search: Posts Made By: sam05121988
2,115
Posted By sam05121988
perl -ne '@arr = split(/\|/,$_,-1); ...
perl -ne '@arr = split(/\|/,$_,-1);
for($i=0;$i<@arr;$i++) {
next if $i =~ /^(5|7|8)$/ ;
$flag = 1 if ($arr[$i] eq "");
}
print join("|",@arr) if $flag;
' file.txt
2,366
Posted By sam05121988
use epoch arithmetic
you can perform epoch arithmetic

1 day = 86400 secs
15 days = 1296000 secs


today's date
$ date
Fri Mar 22 06:18:17 EDT 2013

script to calculate date after 15 days


today=`date...
15,232
Posted By sam05121988
string1="Hi, How are you?" echo "$string1 is...
string1="Hi, How are you?"
echo "$string1 is the value"
replace1="Am fine\nWhat are you doing?"
echo "$replace1 is the value"
sed -e "s/$string1/$replace1/g" file > file_new
this can be done...
1,595
Posted By sam05121988
first of all echo is not required in for file...
first of all echo is not required in
for file in `echo $LIST_OF_FILES`just make sure you are in the same dir where the files are or use absoulte path and you can pass files to the loop as
for file...
1,479
Posted By sam05121988
your array @allwords is empty hence foreach loop...
your array @allwords is empty hence foreach loop would never execute
you will still have an empty hash after the foreach loop
thus the last statement won't cause any difference and @allwords would...
3,975
Posted By sam05121988
I think you are more interested in getting the...
I think you are more interested in getting the job done than gaining knowledge
What Corona688 has mentioned above is very useful info, you should take some time to learn

Anyways, here you...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 11:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy