Search Results

Search: Posts Made By: Diddy
5,091
Posted By Diddy
Split a file based on encountering header
I need to split a file based on headers found

Input file
file1 content:

ADD
john
mickey

DROP
matt
sam

output of file F1
john
mickey

output of file F2
matt
sam
885
Posted By Diddy
Help with awk
Hi,

I have to print last field in a record separated by ~ symbol:

Eg:

code:

echo abc~@def(b d c)~ghi("a b c") | awk -F~ '{print $3}'

getting errors like this

-bash: syntax...
1,644
Posted By Diddy
what if i have to direct #heading1 and #heading2...
what if i have to direct #heading1 and #heading2 records into a one single file
and #heading3 into another file?

The #heading1 and #heading2 will repeat many times within the original file.....
1,644
Posted By Diddy
see the file is like this #heading1 ...
see the file is like this

#heading1
Records

#heading2
Records

#heading3
Records


i want to direct #heading1 and its records into a separate file, #heading2 and its records into...
1,644
Posted By Diddy
Thanks, but this logic wont work if the...
Thanks,

but this logic wont work if the #Time headind repeats again..

i want to direct specific data under specific heading to a separate specific file... will that be possible?
1,644
Posted By Diddy
need help with awk
I have a CSV file like this

#product
laptop,notebook,ipad
hp,acer,apple
dell,lenovo,sony

#region
city,country
newyork,US

#Time
month,year
jan,2011
feb,2012...
4,913
Posted By Diddy
Yes the windows server have the FTP services...
Yes the windows server have the FTP services installed
4,913
Posted By Diddy
Need help for ftp a file from unix to windows server
I have a problem with ftp. i want to ftp a file "file.txt" from unix box to windows server.
The destination folder is something like this:
"\\windowsservername\apps\is\"



FTPUSER=ftp1...
1,049
Posted By Diddy
Doubt with gawk
Hi All,

I have a doubt with gawk. I have a shell script "cleanup" which calls a gawk script "cleanawk" in it.
we have two unix servers epsun532 and wpsun712. So i tested the script in both the...
1,005
Posted By Diddy
How to list all the files in one go
Hi,

I have a directory app:

code:
$pwd
$/app

Now in app directory, it have several app folders, around 100 apps.

Each and every app contains a file with extension *.log

code:
$pwd...
2,237
Posted By Diddy
1,933
Posted By Diddy
thanks...
thanks https://www.unix.com/customavatars/avatar37898_1.gif (https://www.unix.com/members/37898.html) vgersh99 (https://www.unix.com/members/37898.html) n yinyuemi...
1,933
Posted By Diddy
It works but..
its also printing record in aaa. like this



output:


08350|60321|0000|505|0000|1555|000|NYCMT|Pd_1 |-3023.38
60510|08350|60521|0000|505|0000|1555|000|NYCMT|Pd_1 |-11878|
1,933
Posted By Diddy
using nawk
help out with code. two files aaa bbb contains some records..output file xyz should be like this..see below
i/p file:aaa

08350|60521|0000|505|0000|1555|000|NYCMT|Pd_1 |-11878

i/p file: bbb
...
1,816
Posted By Diddy
whether i have to use while in here??
Hi Franklin...If i have to print whole record of first file along with a field in second file...how will be the code?

somthing like this :

i/p :aaa
...
1,094
Posted By Diddy
Anyone aware of load rules??
i found some load rules in our unix script.any know about it>?
4,203
Posted By Diddy
nawk --- can't open file ??
While i am trying to execute nawk in korn shell iam getting this error.

nawk: can't open file $directory../../../filename.

When the file is in home directory it is executing. But its not able...
3,101
Posted By Diddy
How to set column names?
data:
For the code below, it extracts info from two files and stores it in outfile.

For the ouput file i want to mention some column names like this, So where i can mention in the script to get...
1,816
Posted By Diddy
Hi Franklin..Need small help. Trying out similar...
Hi Franklin..Need small help. Trying out similar stuff.

For the ouput file i need to mention some column names like this, So where i can mention in the script to get output like this

nawk -F\|...
1,816
Posted By Diddy
Its Working...Thanks..and Sorry for bothering...
Its Working...Thanks..and Sorry for bothering you.. I am still in learning stage, don't know how to use those commands. Thanks for your help. Can you please explain that if you have time!
AWK -F\|...
1,816
Posted By Diddy
awk: syntax error near line1 awk: bailing out...
awk: syntax error near line1
awk: bailing out near line 1

This is not working.. and also please let me know how to store this output in a seperate file.
SAL_EII_Desc

---------- Post updated...
1,816
Posted By Diddy
How to store it in a file and help with code??
I have two files "SAL.lis" and "accts.fmt" i have to select data from few fields and store them in a seperate file as i explained below..script please????

SAL.lis...
1,165
Posted By Diddy
Please explain this
cat $BDDATA/svucon$i_bal_dup_email.dat ; uuencode $dup_in $dup_out


here svucon$i_bal_dup_email.dat ???
and uuencode ??


Please use and tags when posting code, data or logs etc. to...
1,088
Posted By Diddy
Thanks
Got enough clarity now...
1,088
Posted By Diddy
Can anyone please explain this??
cur_fy=`grep "CONSOL" $GLDATA/parms/cur_fiscalyear.lis | awk '{print $2}'

Here i don't understand "CONSOL" and awk'{print$2)

Please help me out



cur_fiscalyear.lis contents :
DL 2011...
Showing results 1 to 25 of 28

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