Search Results

Search: Posts Made By: tongelja
5,487
Posted By tongelja
Here is something using perl. Though it requires...
Here is something using perl. Though it requires using split to parse the file and it's a bit long.



#!/usr/bin/perl

use warnings;
use strict;

my @array = ();

### Load file into...
4,375
Posted By tongelja
Another way: for i in `find . -type d`;...
Another way:


for i in `find . -type d`; do
echo $i
done
1,824
Posted By tongelja
Another one: awk '{ file_name=substr($0,...
Another one:


awk '{ file_name=substr($0, 9, 6); print $0 > (file_name ".txt")}' input_file
1,562
Posted By tongelja
My mistake there should only be one pipe in the...
My mistake there should only be one pipe in the first code example:


for i in `find . -type f`; do
/usr/local/tool -status $i -x | awk '/(Path|mtime)/{print}'
done
1,562
Posted By tongelja
You can use the find command to traverse a...
You can use the find command to traverse a directory and find all the files and then use the output of that for the input into your script. If you're inthe directory you want to search, you can run...
2,759
Posted By tongelja
Try to use the toupper() function awk -v...
Try to use the toupper() function

awk -v var=${MY_VAR} 'toupper($2) ~ toupper(var)' tmp_file
2,759
Posted By tongelja
Try this...
Replace /$var/ with var, like:

awk -v var=${MY_VAR} '$2 ~ var' tmp_file
Showing results 1 to 7 of 7

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