I have some query relating to some files.Inputs : A=1nList=R1  7n  3n  R2  8n  1n  R3  1n  2n  R4  2n  3n  R5  3n  4nIn output I want new list should start with the string having 1n information. New list:R2 8n 1n R3 1n 2n R4 2n 3n R5 3n 4nPlease confirm can I do it with the help of Shell commands operations.
to print line starting with desire number
patterns
Please explain what is  quotes? Is it usual ? If not - just substitute it in scripts.If you can modify file1 to [^]1n.* it would be easy use grepgrep -of file1 file2 > file3If not you are free to use sedgrep -o $(sed -E 's/(.)(.*)(.)/\1[^\3]*\2.*/' file1) file2 > file3or even readgrep -o $(read -r r <file;q=${r%${r#?}};printf $q[^$q]*${r//[]/}.*) file2 > file3