Search Results

Search: Posts Made By: sagar_1986
2,745
Posted By RudiC
that's why I proposed the MySQL- function...
that's why I proposed the MySQL- function DATE_FORMAT. For an SQL server, how about any of these (from this URL...
2,745
Posted By Don Cragun
I'm not an SQL expert, but still believe this...
I'm not an SQL expert, but still believe this could all be done in SQL without needing awk or sed. And, you showed us the output you said you want with <space> as a field separator and then say that...
1,222
Posted By mjf
Try using a FOR loop: FOR %i IN (sec*.txt) DO...
Try using a FOR loop:
FOR %i IN (sec*.txt) DO find %i /c /v ""
1,492
Posted By ahamed101
sed 's/\(if.*LOGNAME.*\)]/\1 –a $LOGNAME != su4...
sed 's/\(if.*LOGNAME.*\)]/\1 –a $LOGNAME != su4 ]/'

--ahamed
3,301
Posted By Don Cragun
Changing my awk script to: awk -F'[.]' ' FNR...
Changing my awk script to:
awk -F'[.]' '
FNR == 1 {
t = substr($1, 5)
}
{ h[substr($1, 3, 2)]
}
END { for(i = 0; i < 24; i++)
if(!((hour = sprintf("%02d", i)) in h))
out = (out != "" ?...
3,301
Posted By Scrutinizer
You can test if the file is present: if [ -f...
You can test if the file is present:
if [ -f /path/to/file ]; then
process file
fi
1,492
Posted By MadeInGermany
In case the target file is (part of) a shell...
In case the target file is (part of) a shell script, then consider rewriting
if [ ... ]
then
...
fi
as
case $LOGNAME in
sam);;
su1);;
su2);;
su3);;
su4);;
*)
...
;;
esac
Further...
1,492
Posted By Scrutinizer
if [ $LOGNAME != sam –a $LOGNAME != su1 –a...
if [ $LOGNAME != sam –a $LOGNAME != su1 –a $LOGNAME
!= su2 –a $LOGNAME != su3 ]
contains a syntax error. Probably your mean:
if [ $LOGNAME != sam –a $LOGNAME != su1 –a $LOGNAME != su2 –a $LOGNAME...
8,482
Posted By tange
If you have GNU Parallel GNU Parallel - GNU...
If you have GNU Parallel GNU Parallel - GNU Project - Free Software Foundation (http://www.gnu.org/software/parallel/) installed you can do this:
parallel '{} >{.}.out' ::: sample*.shor:
seq 4 |...
8,482
Posted By rbatte1
This could be either keyed on the command line or...
This could be either keyed on the command line or filed and run as a script. The wait will hold up further processing until all background tasks have completed.

Would you be wanting all the...
1,362
Posted By Scrutinizer
Here is a basic alternative POSIX shell script...
Here is a basic alternative POSIX shell script you could try. I hope it is readable:

max=$1 # set max to the first parameter of the script
IFS=, #...
1,362
Posted By ygemici
# ./justdoit file please give the your...
# ./justdoit file
please give the your value(s)= test , tess121 , unix 12 1999999
sam,22,29,test,tess121,unix,12,1999999,23,24,25,26,22

#!/bin/bash
fix=3;x=1;fs=$(grep -o '[,:;.*|]'...
3,527
Posted By itkamaraj
In the perl command, we are removing the control...
In the perl command, we are removing the control characters

ASCII Character Set (http://www.robelle.com/smugbook/ascii.html) ( check out for 33 )

Because your file is windows based.
...
3,527
Posted By itkamaraj
remove those characters by using the below...
remove those characters by using the below command.

perl -pe 's/\033\[[^m]*m//g' < input.txt > output.txt

now open the output.txt and see, whether those weired characters are there or not
...
2,001
Posted By Corona688
The input data you gave contains no lines that...
The input data you gave contains no lines that actually match the lines you want. :wall:

So I still can't tell if it works, how could I possibly test it? :wall:

...But might be closer to...
2,061
Posted By 47shailesh
One error is due to value with leading space...
One error is due to value with leading space entered by user. Also I made few correction in your script.
echo -n "ENTER VALUE BETWEEN 01-31 "
read value
count=`tail -1 filecount.txt | tr -d " "` ...
2,874
Posted By ygemici
what is your o.s platform and shell? try...
what is your o.s platform and shell?

try like this..
echo -n "ENTER DATE "
read value
s=1;last=$value
## if your value contains "i" in the front of your value then --> last=$(echo $value|sed...
2,874
Posted By ygemici
try execute with same subshell..(read(with pipe)...
try execute with same subshell..(read(with pipe) executed normally in separate shell and we can use "(........)" ) for process in the same shell..
(this means --> grouping with parentheses)
#...
Showing results 1 to 18 of 18

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