Search Results

Search: Posts Made By: lancesunny
1,848
Posted By ctsgnb
That's why it is good to get use to use...
That's why it is good to get use to use YYYYMMDD_HHMMSS notation so that they get ordered by name naturally
1,848
Posted By Yoda
You can use a for loop and use the same cut...
You can use a for loop and use the same cut statement which I provided before for variable assignments:-

for fname in `find . -name "ABCJmdmfbsjop???????_${TS}*.data" | sed 's/\.\///g'`
do
#...
1,848
Posted By Yoda
TS=`date +"%m-%d-%Y"` find . -name...
TS=`date +"%m-%d-%Y"`

find . -name "ABCJmdmfbsjop*${TS}*"

---------- Post updated at 11:13 ---------- Previous update was at 11:08 ----------

find . -name "ABCJmdmfbsjop???????_${TS}*.data"
3,004
Posted By Scrutinizer
You could try: oldIFS=$IFS IFS=" " printf...
You could try:
oldIFS=$IFS
IFS="
"
printf "%-95s\n" $(fold -w95 infile1824)
IFS=$oldIFS
3,004
Posted By alister
If fold is used, and if the input text may...
If fold is used, and if the input text may contain tabs (or backspace characters), if those bytes should not be treated specially (count as 1 byte instead of modifying fold's width counter), the -b...
3,004
Posted By alister
dd's unblock conversion yields variable length...
dd's unblock conversion yields variable length records/lines. If, as you say, the result must consist of 95 character lines, you cannot use that dd approach, because it will strip trailing space...
3,004
Posted By Scrutinizer
Do you mean like this? { fold -w95 infile;...
Do you mean like this?
{ fold -w95 infile; echo; } > outfile
3,004
Posted By Scrutinizer
fold -w95 file
fold -w95 file
3,004
Posted By scottaazz
Remove the "<>" around the file names dd...
Remove the "<>" around the file names

dd if=File1.dat of=File1Final.dat cbs=95 conv=unblock
3,004
Posted By vbe
Try: dd if=<infilename> of=<outfilename>...
Try:

dd if=<infilename> of=<outfilename> cbs=95 conv=unblock
8,691
Posted By bartus11
This is the output I'm getting for those sample...
This is the output I'm getting for those sample files:
file a:a
a
afile b:
b
b
bResult:FileName=a
a
a
a
EOF

FileName=b
b
b
b
EOF
Are you getting different output? Or should the...
1,953
Posted By elixir_sinari
Like this (not tested)? awk...
Like this (not tested)?
awk 'substr($0,7,9)==substr($0,211,9){
$0=substr($0,1,210) sprintf("%9s",x) substr($0,220)
}1' file
1,139
Posted By rdrtx1
awk -f a.awk infile > newfile where a.awk: { ...
awk -f a.awk infile > newfile
where a.awk:
{
str1=substr($0,1,6);
str2=substr($0,7,9);
str3=substr($0,16,211-16);
str4=substr($0,211,9);
str5=substr($0,220);
if (str2 == str4)...
1,956
Posted By scottaazz
awk '{ if ($14 ~ /-/) {gsub("-","",$14);...
awk '{ if ($14 ~ /-/) {gsub("-","",$14); gsub("$","-",$14) } print }' yourfile
1,956
Posted By msabhi
awk 'BEGIN{FS="";OFS=FS;} ...
awk 'BEGIN{FS="";OFS=FS;}
{x=0;for(i=351;i<=357;i++){if($i=="-"){$i="";x++;}}
if(x){$357=$357"-"};
}1' input_file
2,956
Posted By msabhi
The latest tested code : awk -F ""...
The latest tested code :


awk -F "" '{for(i=1;i<=NF;i++){if((i>=351 && i<=357) || (i>=24 && i <=43)){gsub("-","0",$i);}
else if(i>=381 && i<=382){gsub(" ","04",$i);}}}1' OFS="" input_file

...
2,956
Posted By RudiC
Try this:awk 'BEGIN{OFS=FS=""} { ...
Try this:awk 'BEGIN{OFS=FS=""}
{
if ($381$382==" ") {$381="0";$382="4"}
for (i= 24; i<= 43; i++) if ($i=="-") $i="0"
for (i=351; i<=357; i++) if...
2,956
Posted By msabhi
-F\, : setting the input field separator as...
-F\, : setting the input field separator as comma
BEGIN{OFS=FS} Setting the Output field separator to be same as Input field seperator
gsub(/"/,"",$25);Here i removed all the characters " in...
2,956
Posted By msabhi
I am extremely sorry for that...please see the...
I am extremely sorry for that...please see the updated code...
2,956
Posted By msabhi
awk -F\, 'BEGIN{OFS=FS}...
awk -F\, 'BEGIN{OFS=FS} {gsub(/"/,"",$25);sub(/.*/,"\"&\"",$25)}1' input_file
Showing results 1 to 20 of 20

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