how can i increment characters in unix.. ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how can i increment characters in unix.. ?
# 1  
Old 07-11-2008
how can i increment characters in unix.. ?

hi..

i am having some 3 files : ka, kb, kc

i want to use these set of files in my script... how can i do that ?
like first it should process "ka" .. then "kb".. then "kc" ...

thanks,

Krips.
# 2  
Old 07-11-2008
try for loop

example u can get by googling
# 3  
Old 07-11-2008
It depends on what you need to do with these files..

Example:

Code:
for i in `ls /your/path/k*`
do
echo "This is your file"
echo "Insert commands depending on what you need to do with fies"
done

# 4  
Old 07-11-2008
Quote:
Originally Posted by nua7
Code:
for i in `ls /your/path/k*`
do...

Code:
for i in /yourpath/k*

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Control characters in UNIX

Hi, My files are showing some control characters in vi editor ^M ^@ and somtimes ^H I removed ^M with %s/^M//g command but how to represent ^@ and ^H e.g. for ^M it is hold ctrl then v and m.. Please help.. I am very new to unix.. (7 Replies)
Discussion started by: prabhat.diwaker
7 Replies

2. Shell Programming and Scripting

String increment in UNIX

Hi, I am able to increment numbers but unable to increment the charters in unix -AIX. Source : AAA BB CCC Increment Number : 5 OUTPUT: AAA BB CCC AAA BB CCD AAA BB CCE AAA BB CCF AAA BB CCG Thanks onesuri Please use CODE tags as required by the forum rules. I have made a wild... (5 Replies)
Discussion started by: onesuri
5 Replies

3. Shell Programming and Scripting

UNIX Special Characters

Any time I do : ls *.txt > mytext.txt I get something like this in the output file: ^ Tue Jan 22 16:19:19 EST 2013 x86_64 x86_64 x86_64 GNU/Linux t1Fam_BrOv :~>alias | grep ls alias l.='ls -d .* --color=tty' alias lR='ls -R' alias la='ls -Al' alias lc='ls -ltcr' alias ldd='ls -ltr |... (5 Replies)
Discussion started by: genehunter
5 Replies

4. Shell Programming and Scripting

Increment a variable in unix bash

Hello There, I have been trying to increment the value of variable to 1, 2, 3 etc. but, it displays 1 1+1 1+1+1 ..... :wall: Could anyone help out with this? for i in *.* do s=`expr $s+1` echo $s j=$i$j mv $i $j done Any help is appreciated? (24 Replies)
Discussion started by: amrutha0303
24 Replies

5. UNIX for Dummies Questions & Answers

increment operators in unix

increment operators in unix (3 Replies)
Discussion started by: pratima.kumari
3 Replies

6. UNIX for Dummies Questions & Answers

To bring all characters in one line in unix

How to bring all characters in one line in unix/solaris ? Eg : If it is a b c then it should show abc (2 Replies)
Discussion started by: mahen1naik
2 Replies

7. Linux

string characters in UNIX

I need some help. when i use the following command, it deletes all lines containing WINNT& v2010 and WINNT& v2010.2 I just want it to delete lines containing WINNT & v2010 only. perl -n -i.bak -e 'print unless /WINNT/&&/v2010/' *.* Danish (2 Replies)
Discussion started by: sdanish110
2 Replies

8. Shell Programming and Scripting

extended characters in UNIX

Hi Guys, I am using db2 load to load from a csv file to a table. Problem is that extended characters ™,®,é,º do not get loaded correctly. Its a UTF 8 format csv and i am using codepage=1208 for the load. Does anybody have an idea on this? Thanks (2 Replies)
Discussion started by: lifzgud
2 Replies

9. UNIX for Dummies Questions & Answers

Help required for Kanji characters in UNIX

Hi, I have a flat file containing Japanese(Kanji) characters.When I open it in my desktop it still shows up in Kanji characters. However when I FTP the file to Unix server , the kanji characters are lost and they turn into Junk characters. Can anyone suggest ways in how I can retain the Kanji... (2 Replies)
Discussion started by: papiya
2 Replies

10. UNIX for Dummies Questions & Answers

unix -> pc (get rid of the funy characters)

I man a command and save it in a file. ftp to pc. but when i displayed it. it has some repeat and funny characters. how can i get rid of it? eg. $ man ls > lsman then use ftp transfer the file from unix to pc. open file laman. it has some thing like NNNNAAAAMMMMEEEE repeat letters... (4 Replies)
Discussion started by: gusla
4 Replies
Login or Register to Ask a Question