Search Results

Search: Posts Made By: pinnacle
3,707
Posted By pinnacle
UNIX command to pivot data
Input data




Output Required



Tried this but not giving right results:
nawk -F"|" '{for (i=1;i<=NF;i++) print $NF}' filename


Please help me fix this. And also explain the logic how...
1,451
Posted By pinnacle
Thank you sir. This works. Could you please...
Thank you sir. This works.

Could you please explain the code for my understanding so, I can write similar code in future.
1,451
Posted By pinnacle
awk or other command to replace JobNumber
Hi,

I need help with replacing WorkJobNumber to empty string

Input data in file:

<property class="java.lang.String" name="WorkJobNumber" value="000000106039"/>

Like this to be
...
2,667
Posted By pinnacle
Replace using awk on fixed width file.
All,

I used to use following command to replace specific location in a fixed width file.

Recently looks like my command stopped working as intended. We are on AIX unix.

awk 'function...
1,147
Posted By pinnacle
Thanks Don Cragun !! I am planning to use this...
Thanks Don Cragun !!
I am planning to use this as a single command in ETL tool (DataStage).
The operating system I am using is AIX.

Output of oslevel command gives : 6.1.0.0


Out of the 2...
1,147
Posted By pinnacle
Substract 1 Month from MonthID
Hi,
I am writing a small unix command to substract one month from the MonthID.
If MonthID = 201301 the below script returns me 201212

if [[ `echo $monthid | cut -c5-6` == 01 ]] then
a=`echo...
851
Posted By pinnacle
Need help with looping please.
Need help with looping please.
851
Posted By pinnacle
Help Modify call to functions depending on file name
Hi,

I am creating a script that does gunzip/unzip/untar depending on the file extension.

I have created 3 functions in my script and call them in following order.
1) gunzip function
2)...
2,071
Posted By pinnacle
Thanks this works.!!
Thanks this works.!!
2,071
Posted By pinnacle
Help to Modify File Name in each function before calling another function.
I have a script which does gunzip, zip and untar.

Input to the script is file name and file directory (where file is located)

I am reading the input parameters as follows:

FILENAME=$1...
3,122
Posted By pinnacle
Thanks, I put the commands you provided in a...
Thanks, I put the commands you provided in a shell and executed it.

I got the following error messages.




Looks like sha1sum is not installed on our server.
Is it a free software or a...
3,122
Posted By pinnacle
Looks like for the call to website I have to...
Looks like for the call to website I have to encode my password as follows:

first convert to uppercase,
then Unicode it in little-endian UTF 16,
Then SHA1 it then base64 encode it.
...
3,122
Posted By pinnacle
Looks like website needs HTTPS POST Message. ...
Looks like website needs HTTPS POST Message.

I got following response from website administrator:



Help is appreciated with unix command to do this functionality.

I am using wget...
3,122
Posted By pinnacle
Wget error while downloading from https website
Hi,

I would like to download a file from a https website. I don't have the file name as it changes every day.

I am using the following command:

wget --no-check-certificate -r -np...
2,375
Posted By pinnacle
Could you please explain how this thing will work...
Could you please explain how this thing will work technically without invoking new shell.
2,375
Posted By pinnacle
NFS Mount 16+ group Issue in AIX
Hi,
I am trying to read files from NFS mount. The ID with which I am trying to read is part of 16+ groups.

This is causing problem in doing change directory to the NFS mount directory.

I was...
975
Posted By pinnacle
Help grep one variable over other
Hi,

I am trying to grep one variable over the other variable

Example:


i=abc
j=ab
grep $j $i


I am getting this error:



The error is due to $i being variable and not...
3,933
Posted By pinnacle
Could you please help me understand how this * ...
Could you please help me understand how this * is doing same as `ls`

Appreciate your help.
1,572
Posted By pinnacle
The code doesn't work as intended. awk...
The code doesn't work as intended.

awk '{$1=$1}1' FS='\n' RS=^ OFS="|" aa

output:



---------- Post updated at 03:42 PM ---------- Previous update was at 03:40 PM ----------



...
1,572
Posted By pinnacle
Help with tr
Hi,

I have file as follows:

Input:


Output:


Required output:


Code:

tr '\n' '|' < ${TEMPDIR}/in.txt > ${TEMPDIR}/out.txt


Help is appreciated to fix code to remove...
3,933
Posted By pinnacle
Shell Script to Abort if file name has space.
Hi,
In my shell script I use the following code to copy files from one directory to other.


for file in `ls`; do

#----------------- Copy Files From INDIR to OUTDIR -------------#...
1,648
Posted By pinnacle
echo 'Preparing to remove the following files:' ...
echo 'Preparing to remove the following files:'
ec=1
printf "\t%s\n" ${INPUTDIR:?'$INPUTDIR is not correctly set'}/${PATTERNA:?'$PATTERNA is not correctly set'}*
if $(rm...
15,233
Posted By pinnacle
The above ones does not seem to be working....
The above ones does not seem to be working. Please see below:

echo $i | sed 's/.*_\([0-9]\+\).*/\1/'
adio_idfl_201302_df.txt



echo $i | sed -r 's/.*_([0-9]+).*/\1/'
sed: illegal option...
15,233
Posted By pinnacle
Get Substring from file name.
Hi,

In my shell script. I am reading all files in directory.

And say if the file names are as follows:

adio_idfl_201302_df.txt
dfa_201301_dll.ctl
dalkd_20130301.csv

I would like to...
1,648
Posted By pinnacle
Thanks I was not aware that printf pattern* and...
Thanks I was not aware that printf pattern* and echo pattern* will list files.

I thought ls pattern* was only command to list files. Thanks for the information.

When I just do


printf...
Showing results 1 to 25 of 242

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