Search Results

Search: Posts Made By: manish8484
2,587
Posted By manish8484
yes, it worked. Thanks a lot buddy you rocks...
yes, it worked.

Thanks a lot buddy you rocks

---------- Post updated at 11:16 PM ---------- Previous update was at 11:10 PM ----------

how to make this date till milli or even till micro...
2,587
Posted By manish8484
Hi Chulber , I have modified the script ...
Hi Chulber ,

I have modified the script based on the one you provide it is not giving the result , it is waiting for some input to be passed :(

---------- Post updated at 11:08 PM ----------...
2,587
Posted By manish8484
HI Chubler , Thanks for the reply I...
HI Chubler ,
Thanks for the reply
I modified the script as
date_n=`date +"%Y%m%d%H%M%S"`
echo $date_n
awk '/FILEHEADER/{a=$1;sub(".*FILEHEADER","",a);b=$2}/FILEHEADER/,/EOF/{print >...
2,587
Posted By manish8484
Inserting date in unix shell with awk
Hi Friends,
I have to insert date in a shell script in awk command.,

Shell script which i have written split on file into multiple and rename them based on some values. I want to add timestamp in...
1,821
Posted By manish8484
FILEHEADERabc def data 1 data 2 data 3 ...
FILEHEADERabc def
data 1
data 2
data 3
data 4 EOF
FILEHEADERabc deg
data 1
data 2
data 3
data 4 EOF

output required :
abcdef.txt which comntains data
FILEHEADERabc def
data 1
data 2...
1,821
Posted By manish8484
Split File data using awk
HI Guys,

I need to split the file in to number of files . file contains FILEHEADER and EOF . I have to split n number of times . I have to form the file with each splitted message between...
2,794
Posted By manish8484
Thanks Kamraj, i will try this and let you know...
Thanks Kamraj, i will try this and let you know if i will face any issue

---------- Post updated at 05:21 AM ---------- Previous update was at 05:06 AM ----------

Hi Kamraj,
I have some...
2,794
Posted By manish8484
Picking contents value of file at run time based on variable values
HI,

I have to write a unix script and need your help.

in my application where I have to invoke this script a varialble is there where the value comes in a variable . for example variable can be...
1,920
Posted By manish8484
Fetching file name from directory
Hi Friends,

I have to write a script to find the file name in the directory.
file name in the directory is like
sourcefile_abc_001.txt
sourcefile_abc_002.txt
sourcefile_abc_003.txt.
...
1,853
Posted By manish8484
my data is coming as INDIAINDIABACD 11...
my data is coming as

INDIAINDIABACD 11 XYZ
INDIAINDIABACD 12 XYZ


and i split the data into multiple files based in INDIAINDIA and file name will be BACD_11.txt and...
4,723
Posted By manish8484
my data is coming as INDIAINDIABACD 11 ...
my data is coming as
INDIAINDIABACD 11
INDIAINDIABACD 12


and i split the data into multiple files based in INDIAINDIA and file name will be BACD_11.txt and BACD_12.txt but...
4,723
Posted By manish8484
Hi when i tried using the way you provided a =...
Hi when i tried using the way you provided
a = substr($0,11,10)
a1= ${a// /}

i got this error
The error context is
a= >>> ${ <<<
awk: 0602-502 The statement cannot be...
4,723
Posted By manish8484
trim spaces in unix for variable
HI Guys

I have written a script using awk to split a file based on some identifier and renaming the file based on two values from specific length. ts a fixed width file.

When I am trying to...
1,853
Posted By manish8484
Trimming Spaces in Unix
Hi All,

I am using following script to name the file base of some values

#!/bin/sh
sourcefile=$1
awk '
BEGIN{ n = 1; name = "FILEFILE12" n ".txt"; }
{
if (substr($0,1,10) == "FILEFILE12")...
5,618
Posted By manish8484
Removing Carriage return in a file after particular string
Hi All,
I want to remove carriage return in a file using some unix command without writing a script
my file is as follows

abc1 abc2 abc3 abc4
abc5 bac6
abc1 abc2 abc3 abc4
abc5 bac6

I want...
1,537
Posted By manish8484
Thanks a lot , it worked
Thanks a lot , it worked
1,537
Posted By manish8484
File Name Extract
Hi Team,

I need help in using cut command ....
my file name is appended with .txt ....line India.txt or America.txt, and I need to remove .txt and keep remaining part of file name for further...
2,716
Posted By manish8484
HI Carlos, I need one small help , the...
HI Carlos,

I need one small help ,
the string in a for example it comes MONKEY and i need to reverse this string and then make the file from that string, how to achieve that .
I tried using...
2,716
Posted By manish8484
I only want MONK and MONKEY as my file name . How...
I only want MONK and MONKEY as my file name . How will gsub works here to get data after FILEHEADER till next 10 characters .
I am new to unix , kindly suggest

---------- Post updated at 08:41 AM...
2,716
Posted By manish8484
Hi my test file is like this format file...
Hi
my test file is like this format

file data is like :
FILEHEADERMONKE ABC
...
...
eof

FILEHEADERMONKEY ABC
...
....
...
eof
and i want data to be split into two files with...
2,716
Posted By manish8484
#!/bin/sh awk ' BEGIN{ fn = "Test" n...
#!/bin/sh

awk '
BEGIN{ fn = "Test" n ".txt"; n = 1}
{
if (substr($0,1,10) == "FILEHEADER") {
close (fn)
n++
a=substr($0,11,10)
a1=`echo "${a}" | sed 's/ *$//'`
echo "After->[${a1}]"
fn =...
1,342
Posted By manish8484
Trimming spaces from a variable
Hi guys,
when I take substring of a particular data using this command
var=substr($0,11,10)
it comes with spaces, when I am trying to trim the spaces it is not allowing me to do that.
Can you...
2,716
Posted By manish8484
Hi guys, when I take substring of a particular...
Hi guys,
when I take substring of a particular data using this command
var=substr($0,11,10)
it comes with spaces, when I am trying to trim the spaces it is not allowing me to do that.
Can you...
2,716
Posted By manish8484
Shell Script for new file name
Hi Experts, I want to write a script in unix for my requirement.
My file contains some headers information in first line and ends the message with EOF.
I want to split the file base on the number...
Showing results 1 to 24 of 24

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