Search Results

Search: Posts Made By: dotran
2,077
Posted By dotran
Thank you mr.Don. Yes...the input had...
Thank you mr.Don. Yes...the input had space.....anyway. I got it work.....thank you for your input.....:)


Filename : SW_PP_PRODUCT_20170505.txt.gz
Data Format : ASCII with...
2,077
Posted By dotran
Thank you for your help Mr.Don. I run the code...
Thank you for your help Mr.Don. I run the code and output 1 line header should no space and require extra 'FILE_NAME,' like below. Could you please help out again?

FILE_NAME,Filename|Data...
2,077
Posted By dotran
Shell script change new format on the file.
Hi---Is there's way can write small shell script or perl script open "abc.txt" file and create new "new_abc.txt" file with format output below? Thanks

cat abc.txt

...
2,379
Posted By dotran
uname -a SunOS scorpion 5.10 Generic_147147-26...
uname -a
SunOS scorpion 5.10 Generic_147147-26 sun4v sparc sun4v

I changed to nawk and get different error.

/staging/dotran :cat abctest.ksh
#!/bin/ksh
nawk '
BEGIN {RS=""
...
2,379
Posted By dotran
Thanks Mr RudiC & Don. I still get syntax...
Thanks Mr RudiC & Don. I still get syntax somehow
/staging/dotran :cat abctest.ksh

#!/bin/ksh
awk '
BEGIN {RS=""
FS="[:\n]"
OFS="|"
for...
2,379
Posted By dotran
Thanks Mr. Don. Cause I really don't understand...
Thanks Mr. Don. Cause I really don't understand how what vgersh99 suggested. Could you help me correct this code?

#!/bin/ksh
awk abc.txt | BEGIN {
RS=""
FS=":"
OFS="|"...
2,379
Posted By dotran
Thanks vgersh99. Is this complete code? Somehow...
Thanks vgersh99. Is this complete code? Somehow I can't make it work....please help. Thanks


#!/bin/ksh
cat abc.txt | BEGIN {
RS=""
FS=":"
OFS="|"
...
2,379
Posted By dotran
Thanks Skynesaver......so should be like this? ...
Thanks Skynesaver......so should be like this?

#!/bin/ksh
ls -1 abc.txt |while read FILE
do
Filename=`cat abc.txt |grep Filename |awk '{print $3}'`
Record=`cat abc.txt |grep Records |awk...
2,379
Posted By dotran
Grep/print/ a test file
cat abc.txt
Filename: SHA_AED_Monthly_SNR_20150331.txt.gz
Data Format: ASCII with carriage returns and linefeeds
Compression: GZIP
GZIP Bytes: 36893068
Unzipped Bytes : 613794510
Records:...
1,749
Posted By dotran
Thanks Vgersh9....but somehow didn't work at all....
Thanks Vgersh9....but somehow didn't work at all.


gunzip -c test.txt.gz | awk -F: '/^(Unzipped|Records|Record L)/{a[$1]+=$NF}END { for(i in a) print i FS a[i]}'
awk: a is not an array
...
1,749
Posted By dotran
$Dtran = filename = test.txt.gz gunzip -c...
$Dtran = filename = test.txt.gz
gunzip -c filename

This is output with command line gunzip -c. I like run in 1 command gunzip -c | etc then get output for (Unzipped Bytes, Records, Record,...
1,749
Posted By dotran
1 command line gunzip -c get 3 output.
Hi everyone----I have big file like 15G to 20G and took really long time to get the output, cause run 3 steps gunzip -c below to get the ouput. Is there is the way can run 1 command line gunzip -c...
1,841
Posted By dotran
Thanks everyone....now i figure what's wrong....
Thanks everyone....now i figure what's wrong. Thanks all again !!!


#!/bin/ksh -x
cd /export/home/mytmp/abc
OUTFILE="/export/home/mytmp/Readme_File.txt"
echo...
1,841
Posted By dotran
Not really sure what's wrong and not get output...
Not really sure what's wrong and not get output on the case....


/export/home/mytmp/abc> ls -ltr
total 9
-rw-r--r-- 1 ca7prod ftpusers 1230 Feb 7 10:42 test_abc.dat
-rw-r--r-- 1...
1,841
Posted By dotran
Please help this syntax error !!!
Please help with this syntax.....somehow not able make it work....


/export/home/mytmp/abc> ls -ltr
total 9
-rw-r--r-- 1 ca7prod ftpusers 1230 Feb 7 10:42 test_abc.dat
-rw-r--r-- 1...
5,030
Posted By dotran
Thanks very much Sea, Don & RudiC. Your code...
Thanks very much Sea, Don & RudiC. Your code worked really well.....i spend 2 days and can't figure how to accomplish this task. You guy really helpful and make me understanding new way how to...
5,030
Posted By dotran
Thanks very much Mr.Don for reply this...
Thanks very much Mr.Don for reply this subject....cause I can't figure what's the best way when use pkzip instead gzip. And out put like below.

Do you mean that you want to use pkzip to create a...
5,030
Posted By dotran
Please please help with this code. I spend...
Please please help with this code. I spend couple days do all kinda stuffs and can't figure out how change this code (copy, rename and pkzip all the files) instead (copy, rename and gzip all the...
5,030
Posted By dotran
Thanks Mr. Don.....I did try nawk and worked...
Thanks Mr. Don.....I did try nawk and worked great. Thanks very much !!!

/usr/bin/nawk -v date="$date" -v from="$from" -v to="$to"
5,030
Posted By dotran
Thank you for you new code Mr Don....but I could...
Thank you for you new code Mr Don....but I could not make it work...I did tried all the option below and still can't pass that awk command.



#!/bin/ksh
#date="${1:-$(date '+%Y%m%d')}" #...
5,030
Posted By dotran
Is better way copy list of multiple files, rename and gzip
Is better way to write the script loop through one by one "Old_File_1: & New_File_1:" to copy 100 files to /staging/test folder then re-name & gzip all those files? I wrote this code below and don't...
12,864
Posted By dotran
for dtran in *.txt ; do tr -d '\015\032' < $dtran...
for dtran in *.txt ; do tr -d '\015\032' < $dtran > $dtran.tmp; mv $dtran.tmp $dtran; done

for file in dsi_*.txt; do dos2unix $file $file.tmp; mv $file.tmp $file; done

edit by bakunin: instead...
2,420
Posted By dotran
Thanks Mr Don C. It's really nice code and I...
Thanks Mr Don C. It's really nice code and I still can't figure out why not move.



I run the code but somehow go to folder final, final1, final2....etc and didn't see the files move at all. ...
2,420
Posted By dotran
What do you want to do with files that contain...
What do you want to do with files that contain exactly 1000000000 bytes? Then move to final1, final2...etc. But only want 1 file go ino 1 directory.
If you have 6, 7, or 8 files that contain more...
2,420
Posted By dotran
Can you give some example what's the find command...
Can you give some example what's the find command to do this? Thanks
Showing results 1 to 25 of 34

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