Search Results

Search: Posts Made By: SriRamKrish
6,535
Posted By RavinderSingh13
Hello, Could you please try the following...
Hello,

Could you please try the following code, hope this helps in variable named s1 you can set the date value which you want to get in output.


awk -F"=" -vs1="20140827" '/^\$\$TODAY/...
6,535
Posted By balajesuri
[user@host ~]$ x=20140819; sed...
[user@host ~]$ x=20140819; sed "s/=[0-9]\{8\}/=$x/" file
SomeTextGoesHere
[ASD.EXAMPLE@ABCD]
$$TODAY_DT=20140819

[FGH.EXAMPLE@ABCD]
$$TODAY_DT=20140819

[QWE.EXAMPLE@ABCD]...
2,184
Posted By Don Cragun
Try: for i in *.dat_* do mv "$i"...
Try:
for i in *.dat_*
do mv "$i" "${i%.dat_*}.dat"
done
2,184
Posted By junior-helper
try this: #!/bin/bash ls *.dat_* | while...
try this:
#!/bin/bash

ls *.dat_* | while read line
do
part1=$(echo "$line" | cut -d"." -f1)
mv "$line" "$part1.dat"
done


edit / another approach:
rename 's/\.dat_.*/\.dat/' *.dat_*
Showing results 1 to 4 of 4

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