Summary: I have a file which has carriage returns at different positions at different lines: 47, 48, 45, etc. I would like to have all of them aligned at posit...
Summary: Jim, Thanks for your solution. It's working if i run it from the command line; however when i put it in a file and run as the script and redirect the...
Summary: Is there any way using the korn shell to delete all records in a file except one?? In other words if I had 6 lines in a file, could I issue one comma...
Summary: my problem is i want to replace a line in a file e.g i want to replace the line DBUID= (some name) with DBUID=$user variable file name is sample.ksh...
Summary: How can I delete the last character in a file. I dont care what the character is - all i want to do is delete the last character. Whats the easiest wa...
Summary: hi, I want to extract from a file 2 files : the first one within a tag to the second tag if it contains '00112' I put all in a file if not I put all ...
Summary: How can I remove a line in a file? e.g. File containing the following 307 319 352 If I wanted to remove line 319, what would be the syntax? Any alive ...
Summary: How do I find out what the largest files are in a file system?? In other words, if I get the message that /tmp is 90% full and /tmp is not a raw slic...
Summary: Hi, I am trying to find a way to grep for consecutive lines in a file. I need to see if a specific string appears 24 consecutive times in a log file ...
Summary: Hi, how do we change a variable's value in a file? e.g. $ cat <file1> AGE=1 bla bla........... i need to change the value of variable "AGE" to a ne...
Summary: Hi, My query is as follows: (1) I want to write a Schell Script which will first read files (file as variable).Each file contains multiple lines/rec...
Summary: I am assuming by "print" you mean "echo" ?? However, the rule would be the same for print -- see commented out line below. The IFS sets the "input fi...
Summary: I have a file that has the following line in it: #define MM_VERSION_STR "3.0a4" I'm trying to find a way to set up a script that, when run, will chan...
Summary: I have a small problem @ work. I am trying to write a script that will seach a directory for a file with the contents 'IS314.1'. Then move that file 2...
Summary: Faraz, read the question from abby and give here an answer. Seems so that you only read my answer and comment it. I didn't see any value in your posti...
Summary: I have to send a file to mainframe and before sending it, I have to execute the quote command to set the record length. Since the file is dynamic, I d...
Summary: Iam Beginner in scripting , I need help in scripting for Cshell (csh)environment In a directory , there is a file named test.txt , the test.txt file c...
Summary: HI I have a very large datafile with almost 8 million lines in it and its size is almost 44 Gigs. I have to look for certain lines in that file and i...
Summary: If a file in unix has the string "123ABC" in it on 50 different lines and I only want to replace the first 25 of them with "xxxxxx", how would I do th...
Summary: Hi, in the test file below there are 2 columns, 1st column followed by a comma ',' and then the 2nd column starting with a ". the 2nd column can have...
Summary: Hi, i neeed to sort a file which has lines like 310494550615007O ptt 310494550615008P ptt 310494550615007P ptt 310494550615008Q ptt 310494550615007P ...
Summary: hi, i need a shell script to find the position of one or more words in one line of a file and then get a number/s which is/are located in the same pos...