10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Maybe this iscorrect forum for my question...
I should read one character at a fixed position from each line of the file. So how ??? should be substituted in the code below:
while read line ; do
single_char=`???`
echo "$single_char"
done < $input_file
OK...I did get an... (0 Replies)
Discussion started by: arsii
0 Replies
2. Shell Programming and Scripting
Hello,
The last character is a comma ,
I have tried the following:
sed -e 's/\,$//' filename-to-read
however - there are still commas at the end of each line...:confused: (5 Replies)
Discussion started by: learning
5 Replies
3. Shell Programming and Scripting
hello all
i request you to give the solution for the following problem..
I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print
g
go
goo
goog
googl
google
like this Using unix Shell scripting...
without using... (1 Reply)
Discussion started by: samupnl
1 Replies
4. Shell Programming and Scripting
Hi,
How read character by character from a file .
and i need replace '.' with null if it comes as a 5 character
i am beginner ...please help me (1 Reply)
Discussion started by: kartheek
1 Replies
5. Shell Programming and Scripting
Hello All,
We are getting files from sftp server through file transmission protocol & after transmission we are removing all the control M
(^M) characters from them.we are expecting various kind of special characters in the files.
we are tried removing '^M' characters through 'dos2unix' command... (2 Replies)
Discussion started by: Aquilis
2 Replies
6. Shell Programming and Scripting
Hello all respected people,
Can i read a file character by character without using sed,awk and perl commands.
Thanks in advance. (4 Replies)
Discussion started by: murtaza
4 Replies
7. Shell Programming and Scripting
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! (1 Reply)
Discussion started by: raghav525
1 Replies
8. Shell Programming and Scripting
How to read character by character using awk (6 Replies)
Discussion started by: karnan
6 Replies
9. Shell Programming and Scripting
I need a better way to read the first character of each line in a file and check if it equals the special character ¤. This character tells me where there is a break in the reports. The file has over 500,000 lines. Currently, this is my code -
if ]
I am using Korn Shell as a scripting... (7 Replies)
Discussion started by: azelinsk
7 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I need a script to read the n° character from a text file.
eg: if the text file contains the line "123456" ,I nedd a command to display the number 4, as an example.
I tried with awk and printf but it seems only works with words separated with spaces, but in this case I have only one word... (15 Replies)
Discussion started by: piltrafa
15 Replies