Search Results

Search: Posts Made By: shubhendu
6,712
Posted By shubhendu
I dont think to kill a process you need a script....
I dont think to kill a process you need a script.

This can be done using kill command.
4,795
Posted By shubhendu
if your input is symmetric.. i.e blah blah is...
if your input is symmetric.. i.e blah blah is always the second column then CUT should be a better option.

Please confirm if this is the case. If so,


cut -d"," -f2 <input_file> >...
1,947
Posted By shubhendu
This is one way you can do it: Create a XML...
This is one way you can do it:

Create a XML template and store it having unique variable names [ for ones you want to replace the values with ].

Read this template.
Replace the variables...
1,762
Posted By shubhendu
this will work... if [[ "$1" =...
this will work...

if [[ "$1" = "WO_STMT_05292009" || "$1" = "WO_BENE_STMT_05292009" ]]
then
echo "correct"
else
echo "error"
fi
1,553
Posted By shubhendu
is this what you want? date...
is this what you want?


date +"%0m/%0d/%y"
10,172
Posted By shubhendu
redirect it /dev/null
redirect it /dev/null
10,172
Posted By shubhendu
strange... Ok do this echo $line | grep...
strange...

Ok do this

echo $line | grep -i "PATTERN"
if [ $? -eq -0 ]
then
bla bla
else
bla bla
fi
10,172
Posted By shubhendu
you can do some thing like this: if `echo...
you can do some thing like this:

if `echo $line | grep -i "PATTERN"`
then
bla bla
else
bla bla
fi

this works in KSH.
3,557
Posted By shubhendu
You can do this way: # echo "Shubhendu"...
You can do this way:


# echo "Shubhendu" | awk '{print substr( $0, 3, 3 )}'
bhe
#


:b:
4,798
Posted By shubhendu
if I get your question right... then you need to...
if I get your question right... then you need to read the extn of all the files? Am I correct?

If so, above code will be of less help.

You can try this:


var1=abcd.xyz
var2=$(echo...
2,822
Posted By shubhendu
You welcome. This code will delete blank...
You welcome.

This code will delete blank lines from the file:


sed '/^ *$/d' <file_name>


you can either PIPE this or redirect this to a tmp file and do next operation accordingly.
...
Forum: Solaris 06-05-2009
4,905
Posted By shubhendu
for 2> you need to have a loop say if loop which...
for 2> you need to have a loop say if loop which will check for value of capacity... if 50 or more then take action else no action.

:b:
2,822
Posted By shubhendu
ok, if I get it right try this: sed -n...
ok, if I get it right try this:

sed -n '2,6p' <file_name>

this will print lines starting at column 2 to 6.

Substitute 2 & 6 with your loop variables.

let me know if you need more on...
2,822
Posted By shubhendu
Simple way to do it: head -10...
Simple way to do it:


head -10 <file_name> | tail -5


what this peice of code is trying to do is: get top ten lines of the file and print last five of those to STD output. you can keep...
6,199
Posted By shubhendu
just a minor change in above code... ...
just a minor change in above code...


gsub("#"," ",tochange)


:p
Forum: AIX 06-04-2009
22,195
Posted By shubhendu
you may use this... find [SEARCH_PATH]...
you may use this...


find [SEARCH_PATH] -type f -size +[MEG_BYTES]000000c


:b:
2,636
Posted By shubhendu
use this sed '/\.tk *$/d' dat_file.txt >...
use this

sed '/\.tk *$/d' dat_file.txt > temp.txt

you need to replace the . with \. in order to remove its special usage.
2,297
Posted By shubhendu
Prabhu, you can do it in two ways: 1>...
Prabhu,

you can do it in two ways:

1> If you have to write the file name in single line then you need to cut each file name before you add the time stamp.

you can try some thing like this...
1,686
Posted By shubhendu
rsh server1 cat /home/test.txt |sed...
rsh server1 cat /home/test.txt |sed s/01-jun-2009/01-aug-2009/ |sed s/ABCD/1234/

this will work... just remove the <" ">

More over if you want to replace data more then one place in the file...
Forum: Solaris 06-03-2009
24,751
Posted By shubhendu
Can you provide some sample input, and yeah what...
Can you provide some sample input, and yeah what have you tried so far....
3,420
Posted By shubhendu
looks like a homework question.... this is...
looks like a homework question....

this is against the forum rules :cool:
19,293
Posted By shubhendu
Check out Perderabo's post. ...
Check out Perderabo's post.

https://www.unix.com/answers-frequently-asked-questions/13785-yesterdays-date-date-arithmetic.html
11,802
Posted By shubhendu
Can you show what you have tried so far?
Can you show what you have tried so far?
1,882
Posted By shubhendu
try this
x=1
var="abc$(printf ${x})"

echo $var

abc1
:b:
2,561
Posted By shubhendu
period=`cut -d"=" -f2 file.txt | cut -d " " -f2` ...
period=`cut -d"=" -f2 file.txt | cut -d " " -f2`
name=`cut -d"=" -f3 file.txt | cut -d " " -f 2,3`
dest=`cut -d"=" -f4 file.txt`

# echo $period
20090531
# echo $name
Clayton Lumbar
# echo...
Showing results 1 to 25 of 28

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