10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, I have a large flat file where i need to change data in columns 131-133 based on what is in columns 172-173. I am not sure if I need to read the file line by line and make the change or if I can do this in a single statement. thank you (3 Replies)
Discussion started by: gblmin
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am a newbie to awk. Here is my problem. Looking for an awk 1-liner to solve it:
My Computing Environment:
- Solaris10
- I prefer to use csh or sh shells
1. Lets say my input file is File1.dat (delimter = | ) and looks as follows:
(File1.dat)
... (1 Reply)
Discussion started by: andy b
1 Replies
3. UNIX for Dummies Questions & Answers
I have a data base of part numbers:
AAA Thing1
BBB Thing2
CCC Thing3
File one is a list of part numbers:
XXXX AAA234
XXXX BBB678
XXXX CCC2345
Is there a sed one-line that would compare a data base with and replace the part numbers so that the output looks like this?
XXXX AAA234... (7 Replies)
Discussion started by: jimmyf
7 Replies
4. UNIX for Dummies Questions & Answers
I have an array containing bunch of characters. I have to check this array for specific character and if "Not Found than" use a goto statement to go to USAGE
set options = (A B C D E F)
@ i = 0
while ($i <= ${#options})
if ($options != "F" || $options != "D") then
goto USAGE
endif
@... (1 Reply)
Discussion started by: dixits
1 Replies
5. UNIX for Dummies Questions & Answers
hi,
I have a directory "test" under which there are 3 files a.txt,b.txt and c.txt.
I need to rename those files to a.pl,b.pl and c.pl respectively.
is it possible to achieve this in a sed or awk one liner?
i have searched but many of them are scripts.
I need to do this in a one liner.
I... (2 Replies)
Discussion started by: pandeesh
2 Replies
6. Shell Programming and Scripting
Hi, I'm writing a ksh script and trying to use an awk / sed / or perl one-liner to remove the last 4 characters of a line in a file if it begins with a period.
Here is the contents of the file... the column in which I want to remove the last 4 characters is the last column. ($6 in awk). I've... (10 Replies)
Discussion started by: right_coaster
10 Replies
7. Shell Programming and Scripting
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies
8. Shell Programming and Scripting
Hi gurus, hoping someone can help with a sed line that can do the following...
I have a flat file with about 1000 records, but in order to import into openoffice spreadsheet, I need to create a delimited file. I'd like to do 2 things with the SED command:
1- add a pipe character "|" at the end... (4 Replies)
Discussion started by: RogCor
4 Replies
9. UNIX for Dummies Questions & Answers
Hello All,
It has been a loooooooooooong time since I had last used sed but decided to use it for a simple task I have .
My goal is to use sed to read variables from a flat file then use those same variables in order to make some subsitutions. However what I am finding is that when the... (1 Reply)
Discussion started by: icalderus
1 Replies
10. UNIX for Dummies Questions & Answers
Hi group,
I want to replace the occurance of a particular text in a paragraph.I tried with Sed,but Sed only displays the result on the screen.How can i update the changes in the original file???
The solution should be a one liner using awk and sed.
Thanks in advance. (5 Replies)
Discussion started by: bishnu.bhatta
5 Replies