I use the program to change an occurance of a word throughout different files that are being tested. At first i had to Create a new script, sub2, taking the same three parameters (replacing an occurance of a word in a shell script), that treats the string to be replaced as plain text instead of as a regular expression. I did that and now I have Generalize my sub2 script, producing a new script sub3 that will apply a substitution to any number of files given on the command line. For example
~/UnixCourse/scriptAsst/sub3 foo bar myFile1.txt myFile2.txt
myFile3.txt
should apply the same substitution throughout each of the three files named there.
I took that part out and now i have
Last edited by Corona688; 08-09-2012 at 07:24 PM..
I would like to make the same change in multiple shell script files and would like to know if anyone can be of some help? I would appreciate it. (4 Replies)
I have a shell script similar to:
#!/bin/sh
a=1
source a1.sh -- Modifies a
source a2.sh -- Modifies a
echo "After execution, value of a is $a"
What i need is a1.sh script modify the same variable a and same with a2.sh. Now the echo "After execution, value of a is $a" should print the... (1 Reply)
I have four scripts to run.
My 1st script will make script2 and script3 to run. I am setting a cron job for this script1 to run continuously.
This script1 will check for 2 text files and based on the existance of those text files it will initiate the script2 and script3.
Now my doubt is that... (2 Replies)
Hi,
I need help to split lines from a file into multiple files.
my input look like this:
13
23 45 45 6 7
33 44 55 66 7
13
34 5 6 7 87
45 7 8 8 9
13
44 55 66 77 8
44 66 88 99 6
I want to split every 3 lines from this file to be written to individual files. (3 Replies)
I am learning how to write shell scripts and have come across an issue. I'm trying to write a script that looks for a directory called public_html, and if it finds one, to print the number of lines that contain applet tags (containing '<applet') in all files that end in either .html or .htm that... (7 Replies)
Hi All,
After reading that the sort command in Linux can be made to use many processor cores just by using a simple script which I found on the internet, I was wondering if I can use similar techniques for programs like the awk and sed?
#!/bin/bash
# Usage: psort filename <chunksize>... (7 Replies)
Hi, I was hoping that someone could help me. I have a problem that i am trying to work on and it requires me to change text within multiple files using sed. I use the program to change an occurance of a word throughout different files that are being tested. At first i had to Create a new script,... (1 Reply)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (1 Reply)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (6 Replies)
I am not sure what I am doing wrong here. The code should work fine. I have been making small changes insuring that each new bit works. Now running my sed through multiple files I am getting incorrect output. Any help and instruction would be greatly appreciated.
The problem -
Generalize... (10 Replies)
Discussion started by: Lycopene
10 Replies
LEARN ABOUT DEBIAN
xclip-copyfile
XCLIP-COPYFILE(1) General Commands Manual XCLIP-COPYFILE(1)NAME
xclip-copyfile, xclip-cutfile, xclip-pastefile - copy and move files via the X clipboard
SYNOPSIS
xclip-copyfile [-p] FILES...
xclip-cutfile [-p] FILES...
xclip-pastefile
DESCRIPTION
xclip-copyfile copies files into the X clipboard, recursing into directories.
xclip-cutfile copies the files, but also deletes them afterwards.
-p preserve path formation
xclip-pastefile pastes the files out of the clipboard
EXAMPLES
Copying a file to a remote host
[maggie.lkpg.cendio.se ~]$ echo "A file created on ${HOSTNAME}" > file1
[maggie.lkpg.cendio.se ~]$ xclip-copyfile file1
[sofie.homeip.net ~/doc]$ xclip-pastefile
file1
[sofie.homeip.net ~/doc]$ cat file1
A file created on maggie.lkpg.cendio.se
Copying an entire tree structure
[sofie.homeip.net ~]$ xclip-copyfile doc
[maggie.lkpg.cendio.se ~/tmp]$ xclip-pastefile
doc/
doc/letter-mom-april.txt
doc/file1
doc/letter-dad-march.txt
Copying files with preserved path information
[maggie.lkpg.cendio.se ~]$ xclip-copyfile -p /etc/sysconfig/grub
tar: Removing leading `/' from member names
[sofie.homeip.net ~/tmp]$ xclip-pastefile
etc/sysconfig/grub
[sofie.homeip.net ~/tmp]$ ls etc/sysconfig/grub
etc/sysconfig/grub
Moving files
[sofie.homeip.net ~]$ ls letter-brother-may.txt
letter-brother-may.txt
[sofie.homeip.net ~]$ xclip-cutfile letter-brother-may.txt
[sofie.homeip.net ~]$ ls letter-brother-may.txt
ls: cannot access letter-brother-may.txt: No such file or directory
[sofie.homeip.net ~]$ cd doc
[sofie.homeip.net ~/doc]$ xclip-pastefile
letter-brother-may.txt
AUTHORS
This manual page was written by Maximilian Gass <mxey@cloudconnected.org> for the Debian project. It may be used for everything else, of
course.
XCLIP-COPYFILE(1)