Search Results

Search: Posts Made By: Korn0474
8,144
Posted By alister
The following will work with the data sample you...
The following will work with the data sample you provided. However, it will not work with comments that span multiple lines. If you need something more complicated, you might want to look into using...
3,619
Posted By anurag.singh
#!/bin/ksh exec 2>/dev/null ls new_* | while...
#!/bin/ksh
exec 2>/dev/null
ls new_* | while read i
do
if [[ `echo $i` != new_dat.bak ]] && [[ `echo $i | cut -c1-7` != new_ig_ ]]; then
j=`echo "$i"|cut -c5-`
mv $i $j...
3,619
Posted By Scott
$ ls ...
$ ls
new_a new_b new_c new_dat.bak new_ig_1 new_ig_2



ls new_* | while read FILE; do
[[ "$FILE" = new_dat.bak ]] || [[ "$FILE" = new_ig* ]] && continue
mv "$FILE" "${FILE#new_*}"...
Showing results 1 to 3 of 3

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