Search Results

Search: Posts Made By: malts18
1,208
Posted By malts18
sed and recognizing a runtime parameter
I thought I posted this before, but cannot see the post, so will re-post.
Apologies if it now appears twice !

My script prompts for a 7 digit parameter : read f1
I then run a find command to...
3,626
Posted By malts18
export / import
Hi panyam & methyl
I changed the 'sh' to the '.' when calling smallscript1, and inserted '{' & '}' around f1 in smallscript2, and my procedure now works great.
Many thanks for your kind assistances.
3,626
Posted By malts18
export & import
Hi panyam
Yes I can execute the 1st one.
In the 'extra unix commands' I use the prompted value.
It is just making it available in the called script that I cannot get to work.
Thanks for your...
3,626
Posted By malts18
export / import
I have a calling script which consists of calls to other scripts via the sh command.

ie vi callscript.sh

sh smallscript1.sh
extra unix commands
sh smallscript2.sh
exit

In...
3,205
Posted By malts18
seds to extract fields based on positions
Hi everyone
I went with Dahus' solution and it works great.
Many thanks to all contributions.
It is nice to know that there are so many warm-hearted and genuine colleagues who are willing to help...
3,205
Posted By malts18
seds to extract fields based on character positions
Thanks Michael

from input :
8022098 abcdefgh abcdefgh DRYING AREAS COM CMP 04/02/11 Job has actual completion date
8028237 050 abcdefg LANE ...
3,205
Posted By malts18
seds to extract fields based on positions
Hi
My file has a series of rows up to 160 characters in length.

There are 7 columns for each row.

In each row, column 1 starts at position 4
column 2 starts at...
1,168
Posted By malts18
Restart Parameter
Hi ctsgnb
Thanks for your contributions, but I now no longer need to string all the scripts together. It will be handy for me to know how to do this in future, though, and so I will do some more...
1,168
Posted By malts18
restart parameter
Thanks ctsgmb
For your code to work, should I declare headings in my script,
like step1, step2, step3, step4 ?
If so, do I need special characters around them to make them headings ?
And should...
1,168
Posted By malts18
restart parameter
I have a shell script with 4 separate functions taking place, one after the other.
Is there a way to introduce a parameter so that if the job fails, then I can restart it at a specific point in the...
992
Posted By malts18
constructing a file for printing
I have a text file, data.txt, which looks like :-

head1 head2 head3
data1 1 data 1 2 data 1 3
data 2 1 data 2 2 data 2 3
data 3 1 data 3 2 data 3 3
etc etc

I would like to print this...
7,670
Posted By malts18
sed to insert a separator
Merci ctsgnb
Thanks M D
Working fine now !
Sorry for the delay in getting back to you : illness & vacation
7,670
Posted By malts18
sed to insert a separator
My txt file consists of records with 6 numbers followed by 3 characters.
Is there a simple “sed” which will insert a | separator between the 6th and 7th position ?
Many thanks
1,827
Posted By malts18
Hi citaylor Lets say my file contents look...
Hi citaylor

Lets say my file contents look like this :-
abc|def|ghi
123/456|789
mno|pqr|stu
987|654|321

I want my script to be able to print the following line to an attached unix printer...
1,827
Posted By malts18
syntax for counting & printing record count
Hi
I have a complex script which outputs a text file for loading into a db.

I now need to enhance this script do that I can issue an ‘lp' command
to show the count of the number of records in...
13,485
Posted By malts18
Many thanks for the prompt responses. I will...
Many thanks for the prompt responses.
I will use scottn's sed solution, as I understand sed better than awk.
Thanks again everyone !
13,485
Posted By malts18
Selecting rows based on values in columns
Hi
My pipe delimited .txt file contains rows with 10 columns.
Can anyone advise how I output to file only those rows with the letters ‘ci'
as the first 2 characters in the 3rd column ?
Many...
2,979
Posted By malts18
Thanks Franklin52. Unfortunately, I am getting...
Thanks Franklin52.
Unfortunately, I am getting :- syntax error near line 1
bailing out near line 1

I created a script containing your code as follows...
2,979
Posted By malts18
Thanks zaxxon for your prompt responses. I have...
Thanks zaxxon for your prompt responses.
I have run your code, and it is certainly removing all the duplicates.
But I am still not getting a "|" command instead of the spaces separating the...
2,979
Posted By malts18
Amend format of output from "last"command
When I run a “last” command, I am getting more than one row per user.

Eg

userabc pts/2 10.253.0.108 Tue Dec 14 09:21 still logged in
userabc pts/2 10.253.0.108 Tue Dec 14 03:57 - 03:59...
1,435
Posted By malts18
thanks jlliagre : I'll master the syntax yet !
thanks jlliagre : I'll master the syntax yet !
1,435
Posted By malts18
sed question from novice
thanks sanjay and franklin52 : the syntax from franklin52 works great. I thought I would try to write a script to prompt the user to enter both the input & output filenames at run time, and came up...
1,435
Posted By malts18
sed question from novice
My pipe delimited file is coming over with spurious “\” characters
inserted into some alpha fields,
which is causing the records to be split into 2.

Eg Abc|def|10/11\
AAAA|xyz
...
Showing results 1 to 23 of 23

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