Search Results

Search: Posts Made By: somu_june
1,124
Posted By somu_june
awk command to copy field to bottom records
Hi All,

I have a below input, I want to copy the Job_name and Created_by field information to other bottom records as shown in below Output


Job_name Created_by Modified_on Modified_by...
1,425
Posted By somu_june
I tried with awk command head -10...
I tried with awk command

head -10 /home/o55555/test11.txt | awk -F '/' '{print $0\%/*","$NF}' .

But I got below error
Syntax Error The source line is 1.
The error context is
{print >>> $0\...
1,425
Posted By somu_june
Getting the folder name and file name after delimiter
Hi,

I have a input

/dev/cm/test1.txt
/qa/tm/hmkr/cc/test2.txt

and I need an out like below

foldername, filename

/dev/cm/,test1.txt
/qa/tm/hmkr/cc/,test2.txt

I tried with awk...
5,358
Posted By somu_june
awk gsub with variables
Hello,

I'm trying to substitute a string with leading zero for all the records except the trailer record using awk command and with variables. The input file test_med1.txt has data like below
...
1,745
Posted By somu_june
Hi Methyl, Thanks for the reply, I...
Hi Methyl,



Thanks for the reply, I don't know how many subfolders I will have under Land directory. I gave only 3 subfolders as an example. That is whay I mentioned '*' in my command to...
1,745
Posted By somu_june
Reading only first record from the multipe directories
Hi All,

I have a requirement, I had a parent directory Land under that we have sub directories
Yesterday,
Today and
Tommorrow

And we have a file test.txt under the above directories...
21,111
Posted By somu_june
Hi All, Thanks every one for helping me. My...
Hi All,

Thanks every one for helping me. My problem got solved by using below command

grep "Job start time" inputfile_jobstart_grep | cut -f2 -d = | cut -f 1,2 -d ' '

where my first cut...
21,111
Posted By somu_june
Hi Strangfeld, If I use your commad It will...
Hi Strangfeld,

If I use your commad It will give me the output as 2 . since in the input file had two time stamp fields with seperator = like below

Job start time=2009-10-16 11:04:48 Job...
21,111
Posted By somu_june
Hi Johnson, I used the command you gave to...
Hi Johnson,

I used the command you gave to me but still I'm not getting any output

grep "^[ ]*Jobstart time" inputfile_jobstart_grep | cut -f2 -d =


Thanks,
Raju
21,111
Posted By somu_june
Hi Johnson , I tried the command removing...
Hi Johnson ,

I tried the command removing backslashes

`cat inputfile_jobstart_grep | grep "^[ ]*Jobstart time" | cut -f2 -d =`


but I'm not getting any output or result from the command on...
21,111
Posted By somu_june
Hi all, Thanks for your replies. My aim is...
Hi all,

Thanks for your replies. My aim is to get the Time stamp portion from a file using grep and cut command.

My input file inputfile_jobstart_grep contains data like below in a single...
21,111
Posted By somu_june
What is the use of back slash \ in piping?
Hi,

I had a script as below

Test_pipe.ksh

#!/usr/bin/ksh
echo `pwd`
id=`pwd | cut -d"/" -f2`
echo $id

result : /export/home
export

The above script executed...
2,275
Posted By somu_june
Thank you very much. It is working now.
Thank you very much. It is working now.
2,275
Posted By somu_june
Why it will not call either function. I'm I doing...
Why it will not call either function. I'm I doing any thing wrong in my script.
2,275
Posted By somu_june
Calling Function Problem
Hi,

I had a scripts which calls two function. One function will call another function, script is working fine but the second function is not calling the first function. Below is the script
...
1,762
Posted By somu_june
Finding Variable Value defined in a Script
Hi ,

I had a script in which there is a variable $LOG defined and I want to check where that variable is getting value from, is there a way I can check for that variable and it's value if it...
5,644
Posted By somu_june
Hi Guys, Thanks for your help it is working...
Hi Guys,

Thanks for your help it is working fine if I do as you said

#!/bin/ksh
C_fun() {
typeset TEXT=${1}
}
C_fun ${1}
echo Value of TEXT $TEXT

I have one more question on this....
5,644
Posted By somu_june
How to see a variable value outside a function in kshell
Hi,

I wrote a small shell script which had function C_fun() and script name is same C_fun.ksh

Here is the program inside the script

#!bin/ksh -x
C_fun() {
typeset TEXT=${1}
}...
Showing results 1 to 18 of 18

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