Search Results

Search: Posts Made By: AspiringD
2,758
Posted By migurus
a sample script below will go through all csv...
a sample script below will go through all csv files in the current directory and rename files with current date:
#!/bin/ksh
today=$(date '+%Y%m%d');
for fname in *.csv; do
...
2,758
Posted By Yoda
DT=$( date +"%Y%m%d" ) for file in...
DT=$( date +"%Y%m%d" )

for file in DIR_A/*.csv
do
fname="${file##*/}"
echo mv "$file" "DIR_B/${fname%.csv}${DT}.csv"
done

Remove echo if output looks good. Replace DIR_A,...
103,804
Posted By Unbeliever
perl -e 'while (<>) { if (! /\|$/ ) { chomp; }...
perl -e 'while (<>) { if (! /\|$/ ) { chomp; } print ;}' input.dat > output.dat

should work assuming the correct end of line is always preceeded with a '|' character.

If you have trailing...
Showing results 1 to 3 of 3

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