I am missing something here, I have a file which contains only one line and that is either a number or character string. I am trying to read the file and assign that value to a variable and here it seems I am missing something and not getting the expected results... Here is the code :
#!/bin/ksh... (2 Replies)
Hi,
I need to place a number located in a text file in a variable so I can perform if/then comparison. How would I go about doing this? Using A=awk '{print $2}' maintenance_date.tmp does not seem to work.
Thanks (1 Reply)
Hi Gurus,
I am new to unix.I have a requirement as below
I have text file like a.txt which contains
a.txt
hi hello
process update
status
Ok to Proceed no issues good
data arrangement
My requirement here is i need to read the file and check for the words
"OK to Proceed" and if... (2 Replies)
I was trying to store the number of lines in a file and store it in a file.after that i want to store the information in a file to a variable which is further used in the if loop to check certain condition.
#!/bin/bash
cat <file> | wc -l > count.txt
x="$count.txt";
i=10;
if ; then
cat... (10 Replies)
Hi folks.
I have this variable called FirstIN that contains something like this: 001,002,003,004...
I am trying to assign the content of this variable into ModifiedIN but with the following format : 001 002 003 004...(changing the commas for spaces)
I thought about using sed but i am not... (17 Replies)
Friends,
I have a file output.txt with values as below:
092307135717
061910135717
I want to know how to read this file and then assign each value to a variable.
say like
var1=092307135717
var2=061910135717
So that I can use this VAR1 and Var2 in the shell script for further processing.... (3 Replies)
I have a txt file
output.txt
Freq = 1900
L = 159I want to assign the values to a variable so that i can further use it in some other script.
like
F=1900
Len=159
etc
i tried doing something with awk but dosent work
F=$(awk 'BEGIN {}/Freq/ {split ($2,a);depth=a};printf "%d\t,... (2 Replies)
my script is some thing like this
i11="{1,2,3,4,5,6,7,8,9,10,11,}"
echo "enter value"
read value ..............suppose i11
x="$value"
echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,}
but its showing "i11" only.
plz help me out to get desired... (10 Replies)
Hi all,
One of my txt file has common format like . And I need to manually assign variable to "/a/b/c/file1/txt" , which has common text before "Calculated summary file:".
I wonder if I can use some command to do that for me, that it read the file and check for that comonn text and assign... (2 Replies)
I have a date column as 06302015 but I need to have variable which extracts 063015.
Am trying something like below but it is not assigning
Please let me know if am missing something. Thanks in advance.
################################
#!/usr/bin/ksh
DT=06302015
... (7 Replies)
Discussion started by: weknowd
7 Replies
LEARN ABOUT DEBIAN
arch::test::tree
Arch::Test::Tree(3pm) User Contributed Perl Documentation Arch::Test::Tree(3pm)NAME
Arch::Test::Tree - A test framework for Arch-Perl
SYNOPSIS
use Arch::Test::Framework;
my $fw = Arch::Test::Framework->new;
my $tree = $fw->make_tree($dir, $version);
my $dir = $tree->add_dir;
$tree->add_file($dir);
$tree->import;
DESCRIPTION
Arch::Test::Tree provides methods to quickly build and modify Arch project trees within the Arch::Test framework.
METHODS
new, root, framework, run_tla, add_file, add_dir, add_link, modify_file, rename_file, rename_dir, remove_file, remove_dir, inventory,
import, commit.
new [framework] [path]
Create a new Arch::Test::Tree instance for path. This method should not be called directly.
root
Returns the project trees root directory.
framework
Returns the associated Arch::Test::Framework reference.
run_tla @args
Run "tla @args" from the tree root.
add_file [dir [name [content]]]
Add a new file name in directory dir. Fill file with content.
dir defaults to the project root ("."). If name is not specified, a unique filename is generated. A default content is generated if
none is given.
add_dir [parent [name]]
Add a new directory under parent, or "." if parent is not specified. If name is not given, a unique name is generated.
add_link [parent [name [target]]]
Add a new symbolic link under parent, or "." if parent is not specified. If name is not given, a unique name is generated. If target is
omitted, a (probably) non-existing target is generated.
modify_file file [content]
Change files content to content, or append "Has been modified." if new content is omitted.
rename_file old new
Rename file old to new. Returns new.
rename_dir old new
Rename directory old to new. Returns new.
remove_file file
Delete file and its associated arch id.
remove_dir dir
Recursively delete dir and its content.
inventory [flags]
Returns the inventory as generated by running "tla inventory flags". flags default to "-Bs" if not specified.
import [summary [log]]
Create a "base-0" revision from tree using the summary line summary and log as log text. If tree contains a log file, summary and log
can be omitted.
commit [summary [log]]
Commit a "patch-n" revision from tree using the summary line summary and log as log text. If tree contains a log file, summary and log
can be omitted.
AUTHORS
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel).
Enno Cramer (uebergeek@web.de--2003/arch-perl--devel).
perl v5.10.1 2005-04-14 Arch::Test::Tree(3pm)