10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have quite a lot of files like
and I want to get rid of the first number for all at once like:
How can I do this in the shell? (12 Replies)
Discussion started by: TimmyTiz
2. Shell Programming and Scripting
I need to replace a line
with the line
Now, "xxxxxxxx" in the above line is some unknown string and $1 is a parameter. I want the content of $1 to be replaced with "xxxxxxxx".
Kindly help me how to do this in the shell scripting. (5 Replies)
Discussion started by: ddeeps2610
3. Shell Programming and Scripting
I have a file which has a list in it
What I want to do is search this list and replace people with humans do the list looks like this:
I think i use something like this....
if cat /list.txt | grep -q 'people' ; then (9 Replies)
Discussion started by: digitalviking
4. Shell Programming and Scripting
As mentioned in the title I have two text files and I would like to replace line number 5 of file #1 with line number 4 of file #2
0.723 (12 Replies)
Discussion started by: f_o_555
5. Shell Programming and Scripting
I am a relative new bee in scripting. I need to develop a script such that the code would iterate through each file in a source directory and append every line of the file with '|' and the corresponding file filename.
INPUT file IF927_1.dat -
H|abc... (4 Replies)
Discussion started by: scripting_newbe
6. UNIX for Dummies Questions & Answers
I am trying to find a way to create a script which will extract the first line of a file and then rename the file (or create a new file with the same content as the old file) using the first line as the name. The first line being a single word, that is. I am hopeless at programming, if anyone can... (5 Replies)
Discussion started by: s.plumb
7. Shell Programming and Scripting
I have a csv file and will like to replace the last character of each line in the file with Z (20 Replies)
Discussion started by: 123script
8. UNIX for Dummies Questions & Answers
I've recently run a script that inserts the filename into all files of my active directory. Now I want to move the filename string and have it replace text a few lines down.
In other words, here's what I'm trying to do. Here is a file called 'goodtimes':
Hi, Welcome... (1 Reply)
Discussion started by: calrog
9. Shell Programming and Scripting
I have a problem in the following code ...
while read line
#Get Line Number
OLDLINE=`sed -n $Lineno $filename`
echo "Un Changed Line : "$OLDLINE
echo "Enter a New Pattern : "
read NewPattern <&1
echo "NewPattern :"$NewPattern
NEWLINE=`cat $filename | sed -n... (1 Reply)
Discussion started by: maxmave
10. UNIX for Advanced & Expert Users
hey guys, how do i replace only a line within a file without messing up the rest of the contents of the file?
see, if possible can you guys give me a straight forward way to do this. i dont want a complex command. what i mean is i know i can accomplish this by using sed, well, i think i can,... (3 Replies)
Discussion started by: Terrible