Write a shell script in Linux to shift all characters in a
file forward by five characters. (Thus “a”
becomes “f’”).

Answers were Sorted based on User's Feedback



Write a shell script in Linux to shift all characters in a file forward by five characters. (Thus ..

Answer / manuswami

cat test.txt | tr '[a-z A-Z]' '[f-za-e F-ZA-E]'

Is This Answer Correct ?    41 Yes 6 No

Write a shell script in Linux to shift all characters in a file forward by five characters. (Thus ..

Answer / dibya jyoti singha

cat abc.txt | tr '[a-z A-Z]' '[f-za-e F-ZA-E]' > xyz.txt

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Shell Script Interview Questions

I have 2 files and I want to print the records which are common to both.

0 Answers  


How will you find the 99th line of a file using only tail and head command?

0 Answers  


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

0 Answers  


How do I run a .sh file on mac?

0 Answers  


What is shell variable?

0 Answers  






How to print all the arguments provided to the script?

0 Answers  


What is inside a seashell?

0 Answers  


I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

0 Answers  


How shell works?

1 Answers  


A file has multiple records each having three 30-bit long fields(field1,field2,field3).There is also a lookup file,LOOK_UP.dat.Now, we need to consider only the last ten digits of field1 and lookup the file LOOK_UP.dat. If there a match then field2 and field3 should replaced with corresponding data from the lookup file. otherwise that particular record,for which there is no match, should be stored in a seperate file.

2 Answers   Wipro,


How to find duplicate record in file using shell script?

0 Answers   IBM, Saama Tech, Wipro,


Explain about stdin, stdout and stderr?

0 Answers  


Categories