Search Results

Search: Posts Made By: royarellano
19,748
Posted By royarellano
Thank you everyone, I got it; thanks. I...
Thank you everyone, I got it; thanks.

I ended-up using:

getmsg=`grep "^1" testmsg.txt | sed "s/^1 //"`
echo $getmsg

Thanks,
Roy

:D
19,748
Posted By royarellano
Truncate Specific Parts of a String
How do you truncate specific parts of a string.

Example:
1 This is the string

Goal:
This is the string

As you can see I'm trying to simply remove the first two characters of the string...
1,967
Posted By royarellano
That didn't work... var2=`grep "^3"...
That didn't work...

var2=`grep "^3" testmsg.txt | sed -e 's/\(^1 \)\(.*\)/\2/g'`
1,967
Posted By royarellano
Sweet, I tried this: var1=`grep "^1"...
Sweet, I tried this:

var1=`grep "^1" testmsg.txt`;

and it worked. But it added the leading number 1 (2, 3, so-on). If I remove the line numbering then it doesn't return the line. So I assume...
1,967
Posted By royarellano
Variable of Content From Part of Other File
I may not being doing this description justice, but I'll give it a try.

I created a mailx script; there will be several messages using the same script where the only difference is the content. So...
3,585
Posted By royarellano
Thanks all; that works, but it puts the content...
Thanks all; that works, but it puts the content on a single line, what if i wanted it to continue down a single column (new line).

file1
a
b
c

file2
d
e
f

var=`cat file1 file2`...
3,585
Posted By royarellano
Moving Content from one file to another with variables
Greetings All,

Need some help, your input is appreciated.

Scenario:
I have five files, each has one line with comletely different content. I execute the command to combine all the five lines...
2,441
Posted By royarellano
LOL :b:
LOL :b:
2,441
Posted By royarellano
That's it! Thanks, works great.
That's it! Thanks, works great.
2,441
Posted By royarellano
Touch New File with First Line
I am interested in creating a new file from a KSH script where the first line is printed. I know how to create the file, but creating with a pre-defined first line is what I need help with.

My...
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 06:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy