10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to make my script as simple as a possible but, I am not sure if the way I am approaching is necessarily the most efficient or effective it can be. What I am mainly trying to fix is a for loop to remove a string from the specified files and within this loop I am trying to copy the lines... (2 Replies)
Discussion started by: Allie_gastrator
2 Replies
2. Shell Programming and Scripting
Hi friend,
I have one file , and i want to read that file character by character.
I need this script in ksh.
while using read option with -n1 am getting error.
while read -n1 c read has bad option
And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies
3. Shell Programming and Scripting
Hi there,
A total sed noob here. Is there a way using sed to delete everything before a character AND after another character on each line in a file? The deletion should also delete the indicating characters(here: an opening and a closing parenthesis).
The original file would look like... (3 Replies)
Discussion started by: bnbsd
3 Replies
4. Shell Programming and Scripting
Hi,
i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command.
thanks in advance,
Sara (9 Replies)
Discussion started by: Sara183
9 Replies
5. Solaris
I get a file which has all its content in a single row.
The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file.
I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies
6. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
7. Solaris
Hi, I need a command that could search the specified directory (and its sub directories) and file contents. In the result display path of the file and string
The command:
find <search_dir> -exec grep <search_string> {} \;
works but doesn't show the file name
Thanks (2 Replies)
Discussion started by: Mack1982
2 Replies
8. Shell Programming and Scripting
Hi,
I have a command "get_data" with some parameters in few *.text files of a directory. I want to first find those files that contain this command and then append the following parameter to the end of the command.
example of an entry in the file :-
get_data -x -m50 /etc/web/getid
this... (1 Reply)
Discussion started by: PrasannaKS
1 Replies
9. UNIX for Dummies Questions & Answers
UPDATE: Sorry, disregard this.
It did work, I made a mistake; I just shouldn't have been using maxdepth.
I do think it is good to know, however, that
find | grep '#' | xargs rm
will "clean up" funnily named files in a directory. Of course, some of those funnily named files are there... (0 Replies)
Discussion started by: tphyahoo
0 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I would like to use grep to find files which contain NULL characters. I'm not sure how to represent the null character in the grep statement.
Could anyone help please?
Thanks!
Helen :confused: (5 Replies)
Discussion started by: Bab00shka
5 Replies