Search Results

Search: Posts Made By: kokoro
2,070
Posted By kokoro
Definitely agreeing with you :) I just shook...
Definitely agreeing with you :)
I just shook my head when I saw it ha ha!
I just thought, do what they say and trust it :)
2,070
Posted By kokoro
Hi! It is an Oracle Linux Server 7.1. I have...
Hi! It is an Oracle Linux Server 7.1.
I have tried the usual grep commands I can search in the site, but I have yet to see a mechanism that reads a file for strings (probably should be done using a...
2,070
Posted By kokoro
Search strings from a file in files in a directory recursively; then print the string with a status
Hi All,

I hope somebody would be able to help me.
I would need to search a string coming from a file, example file.txt:

dog
cat
goat
horse
fish


For every string, I would need to know...
1,225
Posted By kokoro
Map a string in a the middle of a record
Hi Folks!

I hope you can help me figure this out. I need to print a record which contains the contents of a config file. The contents of the config file should be found within the 21st and the...
2,019
Posted By kokoro
Thanks! I will try this one :)
Thanks!
I will try this one :)
2,019
Posted By kokoro
Yes exactly my friend, i hope someone can help me...
Yes exactly my friend, i hope someone can help me in composing a one or two liner awk command since I am a bit worried with the time it would take to process the source file if it has hundred...
2,019
Posted By kokoro
Mapping a data in a file and delete line in source file if data does not exist.
Hi Guys,

Please help me with my problem here:
I have a source file:

1212 23232 343434 ASAS1 4
3212 23232 343434 ASAS2 4
3234 23232 343434 QWQW1 4
1134 23232 343434 QWQW2 ...
1,413
Posted By kokoro
[Solved] what does this do? if [[ -n "${ENV_VAR}" ]]
Hi Guys!

What does this do?
if [[ -n "${ENV_VAR}" ]]

what does -n option do here? I can't find the explanation using man test.

Thanks in advance!


Please view this code tag video...
1,682
Posted By kokoro
Thanks for the replies... I just wonder if the...
Thanks for the replies... I just wonder if the date is a leap year...
example: 20120229... and there is no 20090229... in this case it should be the next day 20090301 is subtracted by 3 years
1,682
Posted By kokoro
Static date adding and subtracting years
Hi Gurus!

I have a static date in a YYYYMMDD format; and I want get the date 2 years in the past and 2 years in the future.

static_date=20010203

old_date=$static_date - 3 years...
2,467
Posted By kokoro
file transformation using fixed width file
Hi Gurus!

I need to make some file transformations. Please help.

This is my input file. It has four columns with fixed width.


1 aaa bbbb cccc
2 eee dddd jjjj
3 fff gggg ...
5,604
Posted By kokoro
thanks guys! all of these worked for me.
thanks guys! all of these worked for me.
5,604
Posted By kokoro
Converting column to rows for every 3 lines in the column
Hi gurus!

Please help me with this one. I have an file with the following contents:

a
b
c
d
e
f
g
h
i
j


I would like to make to transform it to look like this as my output file:
...
7,080
Posted By kokoro
Sorry for the confusion. I can't figure out how...
Sorry for the confusion. I can't figure out how to use you awk with the restriction of the while loop in my premise. The output file that I need to generate requires other information from other...
7,080
Posted By kokoro
i think this works with the premise.
i think this works with the premise.
7,080
Posted By kokoro
It does have the same type of data. So the...
It does have the same type of data.
So the execution of the awk command will be before the while loop is declared right? so the code will look like this:

awk -F'|' 'BEGIN {...
7,080
Posted By kokoro
I may have to do a printf or some other...
I may have to do a printf or some other operations once i got the mapped value from the file. How will the code look like if I use this awk. But you are correct, performance will be an issue if I...
7,080
Posted By kokoro
find string and get the rest of the line in a pipe delimited file
Hi friends,

I have a file where I should search for a string and get the rest of the line but without the delimiter using awk.
for example I have the series of string in a file:
input_string.txt...
4,647
Posted By kokoro
creating an executable file from shell scripts
Hi Friends,

I have a shell script which does some operations etc, would it be possible to create an executable file out from this shell script? meaning the executable file is not editable, thus...
2,609
Posted By kokoro
awk using 2 input files instead of while loops
Hi Friends,

I have two files as input with data that looks like this:
file1.txt

1
2
3
4
file2.txt

a,aa
b,bb
c,cc
d,dd
e,ee
f,ff
instead of me doing 2 while loops to get the...
1,753
Posted By kokoro
It is still not working, the difflist.txt is...
It is still not working, the difflist.txt is still empty...

the output of the diff is in this format:

3a4
> 5


then awk will do the rest supposedly.

---------- Post updated at 12:02...
1,753
Posted By kokoro
diff then awk two files
Hi friends,

i am trying to diff two files and the result will be passed to awk and this will get the first 20 characters in every line and put the result in a file.... but i can't generate an...
2,445
Posted By kokoro
Sorry for my ignorance... previously I was using...
Sorry for my ignorance... previously I was using AIX and I can use print as a command inside any random script... and now I am on Linux, which uses Bash, and print will not work in this environment....
2,445
Posted By kokoro
Missing print binary/executable
Hi friends,

I am trying to execute some of our scripts and apparently I had this error message:

bash: print: command not found


Every other scripts runs smoothly excepts this that uses the...
9,793
Posted By kokoro
check if two files exists at the same time in one location
Hi friends,

I am trying to check if the two files i am expecting are created in a specific location.

if both files does not exist, do an echo

if [ [ ! -f out1.txt ] -a [ ! -f out2.txt ] ];...
Showing results 1 to 25 of 33

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