Search Results

Search: Posts Made By: Prev
2,488
Posted By Prev
awk if one liner syntax for equating with a string variable
I would like to have help with syntax for using a string varaibles inside if and else in a awk one liner.
Eg. I would like to say, list all the filenames that have been modified in a particular...
7,459
Posted By Prev
help with tar & zip only last months(say,Sep) files
Need to
1. archive all the files in a directory from the previous month into a tar/gz file, ignoring all already archived 'tar.gz' files
2. Check created .tar.gz file isnt corrupted and has all...
3,200
Posted By Prev
I/P Example : O/P: Thanks.
I/P Example :


O/P:


Thanks.
3,200
Posted By Prev
Below command just prints the file , no lines are...
Below command just prints the file , no lines are appended ..



Regards.
3,200
Posted By Prev
Oh.. it doesnt seem to work at my end ... and...
Oh.. it doesnt seem to work at my end ... and kindly explain your new answer if you choose to reply .. Its really nice of you to bear with me.. Thanks in advance ..
3,200
Posted By Prev
Concatenate all data between two patterns
Great. Thanks. So, to concatenate all data(not jst the part after =) in a block (all lines b/w Begin .. and end .. line ) , I tried with
awk '/^BEGIN/{s=x} {s=s?s OFS $NR:$NR} /^End/ && s {print...
3,200
Posted By Prev
Thanks both of you .. brilliant. Can you kindly...
Thanks both of you .. brilliant. Can you kindly explain your solution? It would be really helpful if there is slight change in the format of input file, plus , I am interested. :)
3,200
Posted By Prev
Concatenate text between patterns in individual strings
In any given file, wherever a certain data block exists I need to concatenate the values(text after each "=" sign) from that block. in that block. The block starts and ends with specific pattern, say...
12,254
Posted By Prev
help with navigating index in script
Can anyone please brainstorm and help me ?

I gave up the idea of using string variable as it keeps growing larger with each recursive function the control goes in rather than maintaining a value...
12,254
Posted By Prev
hi Itkamaraj, Thanks for reply but this wont...
hi Itkamaraj,

Thanks for reply but this wont serve my purpose .. As i need to use that inside a recursive loop.
Let me provide example of what i need to do..
I have data in form of index but in...
12,254
Posted By Prev
append to same string variable in loop
I want to append values to same string variable inside a recursive function that I have .. I do not want to write to any file but use a variable..
Can anyone please help with it? Thanks in advance.
6,408
Posted By Prev
Exit script after exactly 3 hours
Need to run a script for exactly 3 hours.
It will have while loop which is to keep running until its 3 hours since the script's invocation time and then exit the script.
Script could be invoked...
3,775
Posted By Prev
Thanks Ahamed, print -r worked fine for me. ...
Thanks Ahamed, print -r worked fine for me.
uname -rs gave the version as
AIX 3

ygemici, the output of od -c is of the type :
0000220 P , s e r v e r j o b \n ...
3,775
Posted By Prev
Dear ygemici, if [ -s "$wrkdir/temp.$i"...
Dear ygemici,


if [ -s "$wrkdir/temp.$i" ]
then
while read -r line1
do
echo $line1 > $wrkdir/datatemp
done < $wrkdir/temp.$i
fi

...
3,775
Posted By Prev
While read line loop writes \02 in file as ^B
Thanks. That got resolved. I noticed another issue with while loop

while read -r line1
do
echo $line1 > $wrkdir/datatemp


for \01 in $line1 , ^A is written...
3,775
Posted By Prev
Didnt work... BAsically echo $1 | awk...
Didnt work...

BAsically
echo $1 | awk -F',' '{print $1}'| awk -F'\\' '{print $NF} is working fine
but when i store it in a variable like

jobname=`echo $1 | awk -F',' '{print $1}'| awk...
3,775
Posted By Prev
Thanks
Thanks Ahamed, -r worked :)

---------- Post updated at 05:36 AM ---------- Previous update was at 05:23 AM ----------

One more thing please:

echo $1
jobname=`echo $1 | awk -F','...
3,775
Posted By Prev
While read line ignores the '\' in file content
I need to read temp.$i file content line by line through while loop but somehow the '\' do not appear in output.. Can someone guide how to read this exact content line by line in unix :

if...
Showing results 1 to 18 of 18

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