Search Results

Search: Posts Made By: palsevlohit_123
1,312
Posted By palsevlohit_123
Below sample should help u, but if u not able to...
Below sample should help u, but if u not able to code teh below 2 functions then it will be hard.

sqlplus -s <---- this will take care of the auto insert part, but b4 that the insert script with...
3,068
Posted By palsevlohit_123
Only the scp script is not going to help. If...
Only the scp script is not going to help.

If you do the automate (ssh-keygen) login, then scp will be automated/more useful.

How it going to help u?
how frequently this will be used?
what OS...
Forum: Programming 05-02-2013
12,749
Posted By palsevlohit_123
Please find the corrected version, only u need to...
Please find the corrected version, only u need to convert the char to atoi(), that was missing. Rest all are fine... keep going

#include <stdio.h>
#include <stdlib.h>
main(int argc, char*...
2,189
Posted By palsevlohit_123
Step 1: Create a perl script to display the...
Step 1:
Create a perl script to display the time and the output.

Filename : dispTime.pl


#!/usr/bin/perl
while (<>) { print localtime() . ": $_"; }


Step2:
chmod 755 dispTime.pl
...
2,652
Posted By palsevlohit_123
Before making the old -> new, put a conditional...
Before making the old -> new, put a conditional check for the input with a counter.

1. use something like below for the validation
echo "asbc123" | tr -dc '[:alpha:]' #if something return...
4,198
Posted By palsevlohit_123
echo "12.12.52.125.in-addr.arpa name =...
echo "12.12.52.125.in-addr.arpa name = hostname.domain.main.gov" | awk -F"="
'{print $2}'
15,077
Posted By palsevlohit_123
for i in `cat <<inputfilename>> | awk '{ print...
for i in `cat <<inputfilename>> | awk '{ print "16#"$0}'`
do
typeset -i10 i
echo $i
done


or


echo "obase=10; F0" | bc
3,296
Posted By palsevlohit_123
You try the below... echo...
You try the below...


echo "EDW_WHOLESALE_VORTEX" |\
awk '{
for (i=0; i <= length($0); i++)
{
if (substr($0, i, 1) != "_")
printf "[%c%c]", toupper(substr($0, i, 1)),...
925
Posted By palsevlohit_123
Try this out... input.txt file should have your...
Try this out... input.txt file should have your input values.

FYI: this can be done little easier in awk too. but for understanding unix script will be better I think.



while read line...
4,342
Posted By palsevlohit_123
Try the below in sunOS. Angle bracket <<>> texts...
Try the below in sunOS. Angle bracket <<>> texts needs to placed with proper values.



cd <<your path here>>
SUBJECT="TEST Multiple file attachment"
TO_LIST="<<here your all To mail list>>"...
1,761
Posted By palsevlohit_123
Considering the input files are "*.txt" and the...
Considering the input files are "*.txt" and the output will be generated with a new file as "filename.txt.new".

The below code will search for files from current position recursively. if you want...
2,266
Posted By palsevlohit_123
The first issue was we should not include the $...
The first issue was we should not include the $ during read input
Second in the test you can't test a string.

Can you try the below... It should work for you


#! /bin/ksh
echo " enter...
3,033
Posted By palsevlohit_123
Check this... read Input [[ "$Input"...
Check this...


read Input
[[ "$Input" == ?(+|-)+([0-9]) ]] && echo "$Input is numeric"
7,362
Posted By palsevlohit_123
> cat temp.bash count=0 i=0 while read line...
> cat temp.bash
count=0
i=0
while read line
do
i=`expr "$i" + 1`
count=`expr "$count" + "$i"`
done < input.txt
echo " i Value =$i "
echo " Count Value = $count"


> bash temp.bash
i...
7,362
Posted By palsevlohit_123
Updated code below.. count=0 i=0 while...
Updated code below..

count=0
i=0
while read line
do
i=`expr "$i" + 1`
count=`expr "$count" + "$i"`
done < input.txt
echo " i Value =$i "
echo " Count Value = $count"


Output

i...
6,828
Posted By palsevlohit_123
Instead of echo use the below... printf...
Instead of echo use the below...


printf "%03d" "$y"
4,633
Posted By palsevlohit_123
Check whether you have "des"/"crypt" commands in...
Check whether you have "des"/"crypt" commands in your OS.

This I used to encrypt a file.

des -e f7 f7.out

===>f7 is the Input and the f7.out is the resultant.

This I used to decrypt a...
4,640
Posted By palsevlohit_123
Please check the output which got, after taking...
Please check the output which got, after taking the first and the second column only i'm doing the SORT and UNIQ, then how it will be wrong. If so then ur requirement may be differ.

My Outputs......
4,640
Posted By palsevlohit_123
Try out the below.. awk '{print $1,$2}'...
Try out the below..


awk '{print $1,$2}' <<YOUR FILENAME HERE>> |sort|uniq -c
8,555
Posted By palsevlohit_123
can you please give some samples from your...
can you please give some samples from your end(what you are expecting with example)
2,110
Posted By palsevlohit_123
try out this.. NoOfWords=0 while read...
try out this..


NoOfWords=0
while read LINE
do
NoOfWords=`echo $LINE|wc -w|awk '{print $1}'`
#echo "NoOfWords : [$LINE][$NoOfWords]"
if [ "$NoOfWords" -eq "1" ]
...
1,849
Posted By palsevlohit_123
Try this... while read value1 do ...
Try this...



while read value1
do
a=`echo $value1 | cut -d ' ' -f1`
b=`echo $value1 | cut -d ' ' -f2`
c=`echo $value1 | cut -d ' ' -f3`
x=`grep "$a"...
1,455
Posted By palsevlohit_123
Try the below... cat temp.txt |...
Try the below...



cat temp.txt | egrep "A1/EXT|RXOCF" | paste - - | awk '{print $8,$5,$6}'


Note: temp.txt will be the input file.
4,560
Posted By palsevlohit_123
Try this... To get only the filenames ...
Try this...


To get only the filenames
$ find . -name "*" -exec grep -l "SearchString" {} \;

To get the Content with filename
$ find . -name "*" -exec grep "SearchString" {} \;

...
3,368
Posted By palsevlohit_123
Thanks rubin, It works fine. Is there any...
Thanks rubin, It works fine.

Is there any chance by using sed?
Showing results 1 to 25 of 131

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