9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Please excuse for posting new thread on control characters,
I am facing some difficulties in removing the control character from a file extracted from top command,
i am able to see control characters using more command and in vi mode, through cat control characters are not visible ... (8 Replies)
Discussion started by: karthikram
8 Replies
2. Shell Programming and Scripting
Hi ,
I'm using KSH88
I tried the following example to get the last 6 characters from a string
echo 'abcdefghids' | sed 's/.*\(.\{6\}\)$/\1/'
What chages i need to do to get the first 6 characters from the string
my desired output should be abcdef
Thank you (6 Replies)
Discussion started by: smile689
6 Replies
3. Shell Programming and Scripting
Hi All,
Assuming i have got a file test.dat which has contains as follows:
Unix = abc def fgt jug
111 2222 3333
Linux = gggg pppp qqq
C# = ccc ffff llll
I would like to traverse through the file, get the 1st occurance of "=" and then need to get the sting... (22 Replies)
Discussion started by: rtagarra
22 Replies
4. Shell Programming and Scripting
I have a huge file and I want to select first 10 charcters and last 2 characters of everyline and than will filter the unique line.
I know, it must be easy bt I am new to unix scripting:)
Ex.
I have file as below and need to e3kbaird and last 2 characters. and than unique records.
... (3 Replies)
Discussion started by: Sanjeev Yadav
3 Replies
5. Shell Programming and Scripting
Hi,
Is there anyway to find the junk characters in a file.Consider the file has data as given below:
123|abc^M|Doctor^C #record 1
234|def|Med #record 2
345|dfg^C|Wrong^V #record 3
The junk characters are highlighted and this is a pipe delimited file.
Is there anyway to... (20 Replies)
Discussion started by: ashwin3086
20 Replies
6. UNIX for Dummies Questions & Answers
Hey all,
I'm looking for a command that will search a directory (and all subdirectories) and give me a file count for the number of files that contain specific characters within its filename. e.g. I want to find the number of files that contain "-a.jpg" in their name.
All the searching I've... (6 Replies)
Discussion started by: murphysm
6 Replies
7. Shell Programming and Scripting
I have a file sample.txt with the below contents:
Aaa - providioning add ||
dev - reeec
dev kapl ||
ball - HERO ||
bal - provisioning pro ||
for given name i need the output to be the contents between - and || (excluding both)
for eg : input - Aaa
output -... (10 Replies)
Discussion started by: kinny
10 Replies
8. Shell Programming and Scripting
Ok here's my pickle. I have a file in which every line must be the same length. Each field within the line is a certain length. None of these can be changed. What I need to do is look at a specific field within this file, let's say it starts with character 30 and ends with 50. If this field is... (3 Replies)
Discussion started by: DarkHound
3 Replies
9. UNIX for Dummies Questions & Answers
I want to grep from a file an exact character match.
I tried grep -c "$a $b" $file
where a=6 and b=2
the problem is that I get: 6 2 and 6 20
I just need a count of the occurrence.
I'm using the Bourne shell.
I've also tried grep -c '$a $b' $file;
not sure how to do this - any suggestions? (3 Replies)
Discussion started by: jrdnoland1
3 Replies