In all likelihood, you aren't looking for the two character sequence ^M. Instead, you are looking for the carriage return control character that is entered on most keyboards by holding down the control key (sometimes labeled CTL or CNTRL) while pressing and releasing the m key. The following command on a Solaris 10 or 11 system should find and give you a list of the names of all regular files in and under your home directory that contain a carriage return character:
This User Gave Thanks to Don Cragun For This Post:
I was using the following bash command inside the emacs compile command to search C++ source code:
grep -inr --include='*.h' --include='*.cpp' '"' * | sed "/include/d" | sed "/_T/d" | sed '/^ *\/\//d' | sed '/extern/d'
Emacs will then position me in the correct file and at the correct line... (0 Replies)
I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :(
I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
How do I remove non-printable characters from all txt files and output the results to one file?
I've tried the following:
tr -cd '\n' < *.txt > out.txt
and it gives ambiguous redirect error.
How can I get it to operate on all txt files in the current directory and append the output to... (1 Reply)
Hi,
I have a solaris system with only ftp access.Need to get the list of files page wise display..
Also would like to redirect output of "ls" command to a text file in same directory.
Can anyone suggest me the sollution for this?
Rakesh (2 Replies)
Hi,
I'm curious about how to do a very simple thing with regular expressions that I'm unable to figure out.
If I want to find out if a string contains 'a' AND 'b' AND 'c' it can be very easily done with grep:
echo $STRING|grep a|grep b|grep c
but, how would you do that in a single... (9 Replies)
Hi all,
I am going to reitre one solaris 10 server soon.
What are the important config files to backup in case if i want to check how this system was setup (need list in general) ?
Thanks! in advance (1 Reply)
i have a little over 100 files named page1.jpg through page106.jpg. How can I rename them all to remove the page word and add 00 in front of the remaining numbers? I realize this might be multiple commands but cp page*.jpg *.jpg didn't work like I thought it would. (4 Replies)
Hey Guys,
I'm swamped writing code for the forums:
Could someone write a script or command line to safely delete files with special chars in filenames from a directory:
Example:
-rw-r--r-- 1 root root 148 Apr 30 23:00 ?xA??
-rw-r--r-- 1 root root 148... (8 Replies)
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)