Search Results

Search: Posts Made By: Sekar1
2,490
Posted By Sekar1
It works perfectly..... :-) thanks a lot
It works perfectly..... :-) thanks a lot
2,490
Posted By Sekar1
Cut the file name
Hi ,
I am checking whether the file is gz file or not. If it's gz file, i need to unzip it.

My code is as below,


inpfile=$@
echo $inpfile
file1=`echo $inpfile | cut -d "." -f2`
echo...
1,741
Posted By Sekar1
My input is as below $ cat run1.sh ...
My input is as below

$ cat run1.sh
arr={`ls $@`}
echo ${arr }


when i tried to execute,


$ . ./run1.sh scr*
bash: arr : bad array subscript


Pls correct the above mistake.
1,741
Posted By Sekar1
Filter files and print
Hi,

I need to filter and store the files ends with log extension in the array and need to write the file names in the array to a file.

I need to use array to derive this solution. Please help...
14,514
Posted By Sekar1
i tried to check how many files got retrived for...
i tried to check how many files got retrived for the below code. It displays as 1. but there are 3 files in the dir which matches to the pattern.

$ vi run.sh
arr={`ls $@`}
echo ${#arr }


i...
14,514
Posted By Sekar1
Hi, I am getting below error msg $...
Hi,

I am getting below error msg


$ . ./run1.sh scr*
bash: arr : bad array subscript


Below is the code.


$ cat run1.sh
arr={`ls $@`}
echo ${arr }


Pls let me know for any...
14,514
Posted By Sekar1
Hi, Please see the below code $ cat...
Hi,
Please see the below code

$ cat run.sh
arr=(`ls $1`)
echo ${arr }


when i tried to execute the below command

$ . ./run.sh scr*
script1.sh


but the expected output will hold the...
14,514
Posted By Sekar1
Hi .. I need to store the files which are...
Hi ..
I need to store the files which are matched to my input pattern. I don'tt want to store all files.
14,514
Posted By Sekar1
Hi, Pasted the code for your reference. ...
Hi,

Pasted the code for your reference.


$ cat run.sh
echo $1
ARRAY=($(ls $1 | tr '\n' ' '))


When i tried to execute,


$ . ./run.sh scr*


I got the below response only.
...
14,514
Posted By Sekar1
Hi, Please try to check by passing input...
Hi,
Please try to check by passing input paramter at run time.
Thanks
14,514
Posted By Sekar1
To store output of ls command
Hi,

I need to pass a run time input to unix script which tracks the list of files in the directory under certain pattern. The files which are matched to the given pattern then need to be stored...
2,736
Posted By Sekar1
Thanks for your response.
Thanks for your response.
2,736
Posted By Sekar1
extract specific line if the search pattern is found
Hi,

I need to extract <APPNUMBER> tag alone, if the <college> haas IIT Chennai value. college tag value will have spaces embedded. Those spaces should not be suppresses.

My Source file

...
51,836
Posted By Sekar1
Hi Many thanks for your solution. I got the...
Hi Many thanks for your solution. I got the result. Could you please explain me what is the difference in using $ and .*? Also shall i able use this command alone and able to get the desired output?....
51,836
Posted By Sekar1
oh... thanks for explaning. Requesting you to...
oh... thanks for explaning. Requesting you to please solve my above query
51,836
Posted By Sekar1
Many thanks for explaining. Please let me know...
Many thanks for explaining. Please let me know how the below SED command works. What is the use in specifying 1?

sed 's/.*<college>\(.*\) <\/college>$/\1/'

---------- Post updated at 10:35 AM...
51,836
Posted By Sekar1
$ rm final.txt ---------- Post updated at...
$ rm final.txt

---------- Post updated at 07:39 PM ---------- Previous update was at 07:37 PM ----------

Hi I got the output :-)

$ rm final.txt
$ . ./css2.sh
$ cat final.txt
IIT ...
51,836
Posted By Sekar1
$ cat -vet source.txt ...
$ cat -vet source.txt
<Record><sno>1</sno><empid>E0001</empid><name>Rejsh suderam</name><college>IIT Chennai </college> $

---------- Post updated at 07:29 PM ----------...
51,836
Posted By Sekar1
Pls find the details. $ cat source.txt ...
Pls find the details.


$ cat source.txt
<Record><sno>1</sno><empid>E0001</empid><name>Rejsh suderam</name><college>IIT Chennai </college>
$ rm final.txt
$. ./css2.sh
$...
51,836
Posted By Sekar1
I have multiple spaces between IIT and chennai,...
I have multiple spaces between IIT and chennai, but its not displaying in the screen as above

---------- Post updated at 07:07 PM ---------- Previous update was at 07:06 PM ----------

Sorry, in...
51,836
Posted By Sekar1
Pasted as per your request. Please guide me
Pasted as per your request. Please guide me
51,836
Posted By Sekar1
Hi, Please proivide me updates. I am really...
Hi,

Please proivide me updates. I am really facing pbm in printing the word with spaces as it was given in source file.
Thanks in advance.

---------- Post updated at 06:55 PM ----------...
51,836
Posted By Sekar1
Again the same output "No Match found"
Again the same output "No Match found"
51,836
Posted By Sekar1
I got output as "No Match found"
I got output as "No Match found"
51,836
Posted By Sekar1
Hi, I am not getting any error, at the same...
Hi,

I am not getting any error, at the same time no output in the final.txt.
Showing results 1 to 25 of 61

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