10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to add a letter to the end of a string if it repeats in a column.
so if I have a file like this:
the output should look like this:
DOG001-b (15 Replies)
Discussion started by: verse123
2. Homework & Coursework Questions
Florida State University, Tallahassee, FL, USA, Dr. Whalley, COP4342 Unix Tools.
This program takes much of my previous assignment but adds the functionality of printing the concatenated line numbers found within the input.
Sample input from <> operator:
This is hello
a sample... (2 Replies)
Discussion started by: D2K
3. Shell Programming and Scripting
I have a file data_1.out which contains:
1|abc mail|mail subject|mail body
2|def mail|mail subject|def mail body
I am trying to read the variables from data_1.out and use them to print to 2 different files based on the id (first_column)
The problem is I am not able to read the file... (8 Replies)
Discussion started by: sol_nov
4. Shell Programming and Scripting
I want to get newvar outside the while
while read myline; do
I found it its ok now Thank you! (0 Replies)
Discussion started by: sanantonio7777
5. Shell Programming and Scripting
Dear all, today I'm scratching my head with a simple (I believe) issue.
Working with date is quite simple, so if I Need to add some seconds to current time, I'll use:
date --date='+30 seconds' +"%Y-%m-%d %H:%M:%S"But, how to pass the value to add from a variable? I tried the following without... (2 Replies)
Discussion started by: Lord Spectre
6. Shell Programming and Scripting
I have a bash shell script that generates 2 variables that have the current minute and a minute from a log file. Can someone please show me the best way to test if the minutes stray by 5. So basically if:
This is ok:
Last Fitting Min
=============... (2 Replies)
Discussion started by: jaysunn
7. UNIX for Dummies Questions & Answers
want to create script that takes name of directory and all files and will copy each file to new directory.
then fix errors like files do not exist or no permission to create new directory...
these what I have so far...
for i in $(pwd) $(ls)... (23 Replies)
Discussion started by: me.
8. Shell Programming and Scripting
I want to writte a script that replace two character strings by two variables with the command sed butmy solution doesn't work. I'm written this: sed "s/TTFactivevent/$TTFav/g && s/switchSLL/$SLL/g" templatefile.
I want to replace TTFactivevent by the variable $TTFav, that is a... (4 Replies)
Discussion started by: POPO10
9. Shell Programming and Scripting
Man it has been too long since I have had to do this type of stuff...
OK I have a file with lines in it looking like this:
bob:johnson:email@example.com (most lines)
john:F.:doe:firstname.lastname@example.org (but some are like this)
I need to loop through and assign vars to the values:
var Fname =... (29 Replies)
Discussion started by: NewSolarisAdmin
10. Shell Programming and Scripting
Can't seem to find anything on the forums to fix this.
I have a file, one line within this will not have a specific string at the end.
I have the string, but need to append it to the specific line which has it missing.
I need to use a variable for this, $string - I am using double... (13 Replies)
Discussion started by: mandriver