Search Results

Search: Posts Made By: mohsin.quazi
3,514
Posted By mohsin.quazi
OPTARG is not taking SPACE
Hi I have below code in one of my shell script:


if [ $# -eq 0 ]; then fail $USAGE; fi
while getopts hz:r:t:dz: o
do
case "$o" in
h) echo $USAGE ; exit 0;;
r) ...
1,824
Posted By mohsin.quazi
Accessing variables outside the function
I have the below code to find yesterdays date, In this I want to make MONTH, DAY and YEAR as global variableand use it outside the {}, but I am unable to do so , please assist:


#!/usr/bin/ksh...
7,372
Posted By mohsin.quazi
I dont know where I am going wrong, I tried below...
I dont know where I am going wrong, I tried below code I use Â, since recap was already used before.

sed 's/\(Â\)..\( Hybrids\)/\1-\2/' "Non-Agency CMO Daily Trade Recap - Hybrids.reportdata"
...
7,372
Posted By mohsin.quazi
sed 's/Â~V/-/' "filename" But this dosnt...
sed 's/Â~V/-/' "filename"


But this dosnt work,since sed is unable to find ~V, also I cannot see this character when i cat this file, only i see this in vi editor, as an highlighted one.

I...
2,765
Posted By mohsin.quazi
Deleteing one character after an special character
I have below line in a unix file, I want to delete one character after "Â".
20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids

The result should be :
20091020.Non-Agency CMO Daily Trade Recap Â...
7,372
Posted By mohsin.quazi
Dude, I already tried it... no use.. ctlr is "^"...
Dude, I already tried it... no use.. ctlr is "^" in vi editor.
7,372
Posted By mohsin.quazi
Removing special characeter "~V" in a unix file
I have the Unix XML file as below:

<?xml version="1.0" encoding="UTF-8"?>
<ReportData version="1.0"><DisplayName>Non-Agency CMO Daily Trade Recap -...
1,910
Posted By mohsin.quazi
Thanks a lot !
Thanks buddy, this works I did a little more modifications to remove unnecessary content.
1,910
Posted By mohsin.quazi
summing values of a column
I have a file which contains data as below:

-----------------------------------------------------------------------------------------------
GSPWeb Statistics for the period...
42,798
Posted By mohsin.quazi
Thanks a lot !!
I have become fan of awk now.. :b:
42,798
Posted By mohsin.quazi
Formatting output in columns
I have a file which contains data in below format:


nbkv28s MgmtReporting -> TradingDesk 1
nbkv28s RMBS -> Credits 178
nbkv28s RMBS -> PassThrough 96
nbkv28s RMBS -> Prepayment 111
nbkv28s...
4,401
Posted By mohsin.quazi
Thanks
Thanks for the help.. but the output is little unformatted, I wanted these values in seperated column so that they look good...
4,401
Posted By mohsin.quazi
Counting similar lines from file UNIX
I have a file which contains data as below:

nbk1j7o pageName=/jsp/RMBS/RMBSHome.jsf
nbk1j7o pageName=/jsp/RMBS/RMBSHome.jsf
nbk1j7o pageName=/jsp/RMBS/RMBSHome.jsf
nbk1j7o...
62,066
Posted By mohsin.quazi
Getting first word from a line
How can i get first word form a line.

for eg.
I have this line:
"nbs2yth 3123 1 fsfsa thisissamletext"

I want to store the first word(here "nbs2yth") in a variable.

How can i do this,...
Showing results 1 to 14 of 14

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