Is there any cut or awk function that would allow me to take the last part of a path away and save the list into a file? I wrote:
find $HOME -mtime +3 > fileList
cat fileList
/home/102/s/jn/folder/HW
/home/102/s/jn/otherfolder/B.txt
/home/102/s/jn/folder4/3dA/w... (1 Reply)
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
First I have to say thank you to this community and this forum. You helped me very much builing several useful scripts.
Now, I can't get a solution the following problem, I'm stuck somehow. Maybe someone has an idea.
In short, I dump a site via lynx and pipe the output in a file. I need to... (7 Replies)
File having data in following format :
file name : file.txt
--------------------
111111;name1
222222;name2
333333;name3
I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2).
i.e val1=11111 &... (2 Replies)
Hello,
How to cut a char(s) for a word using perl??
I want to cut the number(s) from these sample words:
Port-channel24
Po78
Po99
Port-channel34
$word = "Port-channel24";
I want to put only the number in a varible.
Appreaciate using simple way in order to use it... (3 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Can someone help me to make this code without cutting off words ni the string?
awk '{for(i=1;i<length;i+=100) print substr($0,i,100)}'
Thank you! (4 Replies)
I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word "description" excluding weird characters like $&lmp and without html tags in the new file output.txt. Help me. Thanx in advance. I have attached the input... (4 Replies)
Hi All,
I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl:
run_build_model sparc_ifu_dec
run_drc
set_faults -model path_delay -atpg_effectiveness -fault_coverage
add_delay_paths P1
set_atpg -abort_limit 1000
run_atpg -ndetects 1000
I would like... (6 Replies)
I have a multicolumn text file with header in the first row like this
The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach
for ii in ${hdr}
do
gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
LEARN ABOUT DEBIAN
fence_drac
fence_drac(8) System Manager's Manual fence_drac(8)NAME
fence_drac - fencing agent for Dell Remote Access Card
SYNOPSIS
fence_drac [OPTION]...
DESCRIPTION
fence_drac is an I/O Fencing agent which can be used with the Dell Remote Access Card (DRAC). This card provides remote access to control-
ling power to a server. It logs into the DRAC through the telnet interface of the card. By default, the telnet interface is not enabled.
To enable the interface, you will need to use the racadm command in the racser-devel rpm available from Dell. To enable telnet on the
DRAC:
[root]# racadm config -g cfgSerial -o cfgSerialTelnetEnable 1
[root]# racadm racreset
fence_drac accepts options on the command line as well as from stdin. Fenced sends parameters through stdin when it execs the agent.
fence_drac can be run by itself with command line options. This is useful for testing and for turning outlets on or off from scripts.
Vendor URL: http://www.dell.com
OPTIONS -a IPaddress
IP address or hostname of the switch.
-c cmd_prompt
Force fence_drac to use cmd_prompt as the command prompt
-d dracversion
Force fence_drac to treat the device as though it was for the specified drac version
-D dumpfile
Debug file of the telnet interaction
-h Print out a help message describing available options, then exit.
-l login
Login name.
-m modulename
The module name of the blade when using DRAC/MC firmware.
-o action
The action required. reboot (default), off, on or status.
-p password
Password for login.
-S path
Full path to an executable to generate the password for login.
-f seconds
Wait X seconds before fencing is started
-V Print out a version message, then exit.
STDIN PARAMETERS
action = < param >
The action required. reboot (default), off, on or status.
agent = < param >
This option is used by fence_node(8) and is ignored by fence_apc.
cmd_prompt = < param >
Force fence_drac to use cmd_prompt as the command prompt
drac_version = < param >
Force fence_drac to treat the device as though it was for the specified drac version.
debug = < dumpfile >
Debug file of the telnet interaction
ipaddr = < hostname | ip >
IP address or hostname of the switch.
login = < param >
Login name.
modulename = < param >
The module name of the blade when using DRAC/MC firmware.
passwd = < param >
Password for login.
passwd_script = < param >
Full path to an executable to generate the password for login.
delay = < param >
Wait X seconds before fencing is started
SEE ALSO
fence(8), fence_node(8)fence_drac(8)