Search Results

Search: Posts Made By: mona
Forum: Linux 04-02-2007
5,257
Posted By mona
To copy file cp source dest To get the...
To copy file
cp source dest
To get the current directory detail
pwd
1,695
Posted By mona
Try this egrep...
Try this

egrep '[^]0-9a-zA-Z:;<>=\?@\[\\\^\_`]' <filename>
49,271
Posted By mona
This will give you the current shell echo $0 ...
This will give you the current shell
echo $0
This will give you the login SHELL
echo $SHELL
1,695
Posted By mona
cat -vet <filename> This will display all the...
cat -vet <filename>
This will display all the control characters. ^ and $ represents the start and end of Line.
11,722
Posted By mona
This? $ cat smp.ksh #!/bin/ksh ...
This?

$ cat smp.ksh
#!/bin/ksh
num=00000100
print $num
typeset -i num
print $num

$ ./smp.ksh
00000100
100
$
1,248
Posted By mona
This? ls -lt | egrep...
This?

ls -lt | egrep '*CLIENTINVOICE[0-9]*.archived'
15,305
Posted By mona
In the first command, I am taking the files with...
In the first command, I am taking the files with name "abc_*.txt". Since i have used -t in the ls command, the file which is created recently will always come first. Then awk will pass the filenames...
6,741
Posted By mona
Just include that in a shell script ...
Just include that in a shell script

#!/bin/ksh
in_total=`cat in_file | awk -F: '{in_total += $1 * 86400 + $2 * 3600 + $3 * 60 + $4} END {printf "%d\n",in_total} '`
out_total=`cat out_file | awk...
15,305
Posted By mona
To retain the latest file created with name...
To retain the latest file created with name abc*.txt and to remove the remaining,

ls -lt abc_*.txt | awk '{if(NR!=1) print $9}' | xargs -i rm {}

Another approach. This is based on the...
41,093
Posted By mona
I seem to have misunderstood the requirement....
I seem to have misunderstood the requirement. Hope below is the required soln.

$ sed '$ s/^\(.*\)$/\1qrst/' xyz.txt
abcdef
ghijklm
nopqrst
41,093
Posted By mona
Using sed $ cat xyz.txt abcdef ghijklm ...
Using sed

$ cat xyz.txt
abcdef
ghijklm
nop
$ sed '$ a\qrst' xyz.txt
abcdef
ghijklm
nop
qrst
$ sed '$ a\qrst' xyz.txt > abc.txt
$ mv abc.txt xyz.txt
$ cat xyz.txt
abcdef
ghijklm
nop...
3,589
Posted By mona
Please try this $ cat smp.csh #!/bin/ksh ...
Please try this

$ cat smp.csh
#!/bin/ksh
for i in `cat smp`
do
num=`echo $i | sed 's/^.*[a-zA-Z]0*\([0-9]*\)$/\1/'`
chr=`echo $i | sed 's/^\(.*[a-zA-Z]0*\)[0-9]*$/\1/'`
(( num1 = num + 1 ))...
2,153
Posted By mona
Using awk $ awk -F"," '{gsub(/...
Using awk


$ awk -F"," '{gsub(/ .00/,"0.00",$0);gsub(/ \./,"0.",$0);print $0}' tmp.txt
RECORD ID,CLIENT,CUSTOMER NAME,2883,12:05,8, 16.39, 191.34
RECORD ID,CLIENT,CUSTOMER...
2,153
Posted By mona
Try this sed -e 's/ \.00/0.00/g' -e 's/...
Try this

sed -e 's/ \.00/0.00/g' -e 's/ \(\.[0-9]*\)/0\1/g' -e 's/,\(\.[0-9]*\)/0\1/g' tmp.txt
2,153
Posted By mona
Hope this helps $ awk -F"," '{gsub(/...
Hope this helps

$ awk -F"," '{gsub(/ .00/,"0.00",$7);gsub(/ .00/,"0.00",$8);print $1","$2","$3","$4","$5","$6","$7","$8}' tmp.txt
RECORD ID,CLIENT,CUSTOMER NAME,2883,12:05,8, 16.39, 191.34...
3,589
Posted By mona
Using a script $ cat smp.csh #!/bin/ksh ...
Using a script

$ cat smp.csh
#!/bin/ksh
for i in `cat smp`
do
num=`echo $i | sed 's/^\([a-zA-Z]*0*\)\([0-9]*\)$/\2/'`
chr=`echo $i | sed 's/^\([a-zA-Z]*0*\)\([0-9]*\)$/\1/'`
(( num1 = num +...
7,053
Posted By mona
I found this book...
I found this book (http://www.amazon.ca/Introduction-UNIX-Forouzan/dp/0534951597) very useful for beginners.
1,380
Posted By mona
Will this help? $ cat tmp %is xxx = 123 ...
Will this help?

$ cat tmp
%is xxx = 123
$ sed 's/^\(%is xxx = \)[0-9]*\( *.*\)$/\11234\2/g' tmp
%is xxx = 1234
2,522
Posted By mona
Try this command sed...
Try this command


sed '/\/home\/test\/filelist.txt/ d' srcfile
Forum: Programming 11-13-2006
5,286
Posted By mona
$ cat sample 1234 9876 6789 5677 3452 ...
$ cat sample
1234 9876 6789 5677 3452
9087 4562 1367 2678 7891
$ sed 's/\( \)\{1,\}/,/g' sample
1234,9876,6789,5677,3452,
9087,4562,1367,2678,7891
$

or

$ sed 's/ \+/,/g'...
29,661
Posted By mona
The colon should not cause any problems. Oracle...
The colon should not cause any problems. Oracle will do internal type conversion if the "code" column is number.
29,661
Posted By mona
It's weird !!. I ran your script with the table...
It's weird !!. I ran your script with the table and column names replaced with valid table and column names in my database. It works perfectly for me.
29,661
Posted By mona
Are these columns code and ctrl_perd valid in...
Are these columns code and ctrl_perd valid in your database? Did you execute these queries in SQL Plus?
10,034
Posted By mona
Did you try this cp file1.txt...
Did you try this

cp file1.txt newDirectory/file1_`date +"%Y%m%d_%H%M"`.txt
18,128
Posted By mona
text deleted.. Sorry.. Understood the...
text deleted..


Sorry.. Understood the requirement wrongly
Showing results 1 to 25 of 96

 

Featured Tech Videos

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