Search Results

Search: Posts Made By: raghav525
10,809
Posted By raghav525
read in a file character by character - replace any unknown ASCII characters with spa
Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/

Thanks!
16,108
Posted By raghav525
Thanks!
Thanks for the reply! i got the solution... :)


@echo off & setLocal EnableDelayedExpansion
cd D:\apps\Infa\param\
if exist "%1".prm del /F "%1".prm
for /f "tokens=* delims= " %%a in...
16,108
Posted By raghav525
DOS script to grab the first file in a dir and rename it
:confused:
Hello,
Is there any way to use the dir command / some DOS Script to select only first file of similar pattern of files in a direcotory and rename it for example, one directory has 5...
3,814
Posted By raghav525
Solution
Thanks much! It worked... I used the command
cat /u01/opt/incoming/mainfile.txt | tr -d '\015' > /u01/opt/incoming/mainfile.txt

Prgm is working as expected. Thanks lot... :)

Last Question.....
3,814
Posted By raghav525
Question????
Yes... This mainfile.txt is getting copied from windows server and i can see ctl chars when i open it on Unix. Any solution for this too:confused:? Thanks
2,859
Posted By raghav525
Solution
Try this...

$ls -alt xxxx*.txt
25,458
Posted By raghav525
Solution
In unix ,
$ls filename_*.txt | head -1
3,814
Posted By raghav525
Thanks for the solution
Hi Krishmath...

Thanks for the soultion. Result as expected except with two things...
1. All parameter are creating with space (i can say "with new line") after the $record value such as...
3,814
Posted By raghav525
create diffrent files based on other file and parameters list
I would like ot create shell script/ bash to create diffrent files based on a file and parameters list.

Here is the detail example: I have a textfile and four static parameter files (having ‘?')....
Showing results 1 to 9 of 9

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