Search Results

Search: Posts Made By: f14f21
21,994
Posted By tukuyomi
Using shell builtins (sh, bash and probably...
Using shell builtins (sh, bash and probably others too)
#!/bin/sh

a='testfile.test.txt'

echo "Filename: ${a%.*}"
echo "Extension: ${a##*.}"

exit 0
21,994
Posted By pravin27
f=testfile.txt ; a=`basename $f ".txt"` ;echo...
f=testfile.txt ; a=`basename $f ".txt"` ;echo $a
2,840
Posted By Scott
Great :D But I imagine it's CalDayRunDt that...
Great :D

But I imagine it's CalDayRunDt that you explicitly wanted to change.


$ sed "/CalDayRunDt/ s/'.*/'$curdate'/" file1
,TotUnasgndNetAmt
FROM DEV_EIS_T.Wkly_SO_CCD_MOSumSnpsht
WHERE...
2,840
Posted By Scott
$ cat file1 ,TotUnasgndNetAmt FROM...
$ cat file1
,TotUnasgndNetAmt
FROM DEV_EIS_T.Wkly_SO_CCD_MOSumSnpsht
WHERE
CalDayRunDt = '2010-07-21'
UNION ALL
SELECT
CalDayRunDt
,BusWkCd
,'N'


$ curdate=something
$ sed...
2,840
Posted By bartus11
Try: awk -vx=$curr_date...
Try: awk -vx=$curr_date '{sub("....-..-..",x,$0)}1' file
Showing results 1 to 5 of 5

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