unix command : how to insert text at the cursor location via command line?
Hi,
Well my title isn't very clear I think. So to understand my goal:
I have a script "test1"
with xbindkeys, I bind F5 key in order it runs my test1 script
So when I press F5, test1 runs.
I'm under Emacs/Vi and I press F5 in order to have "blabla" be written at the cursor location.
... but I dunno why when I use it through xbindkeys, "blabla" text isn't written when I press F5 but when I release it ... and I have to release the F5 key very fast else nothing is printed.
And what is more, in firefox it is printed at the same speed as I type... lol ... to much slow ... imagine If instead of "blabla" I have a complete sentence xD
Instead of xbindkeys , I tried gnome keybindings (in metacity) directly too ... but it was even worst concerning the timing
I didn't find a real command that would print a text at the cursor location.... instead of simulate the keyboard ... which doesn't seem to be a good idea :/
please , may someone know a such command or have a good idea ? ^^
Hi All,
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
do
# Process file
echo "File Name=" $file
#l_fileName="${file##*/}"
... (19 Replies)
By using sed command, How to insert a new line before the last four lines of the file.
Old Line
Old Line
NEW LINE!
Old Line
Old Line
Old Line
Old Line (8 Replies)
I'm trying to write a bash script called YN that looks like the following
YN "Specify a question" "doThis" "doThat"
where "doThis" will be executed if the answer is "y", otherwise "doThat".
For example
YN "Do you want to list the file dog?" "ls -al dog" ""
Here's my attempt... (3 Replies)
In Perl. ***edited question below***
Hey all, I am teaching myself some simple CSV file manipulation and have become a little stuck. Say I have the following layout in the CSV file:
age,name,locationIs it possible to INSERT data into the CSV into the correct age order. For example, if I had... (1 Reply)
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
How can I insert the command executed on the shell into the first line of my output file?
For example if I execute;
zcat *.gz |grep “User5501” > users.out
How can I make my users.out look like;
zcat *.gz |grep “User5501” > users.out
User5501 PA
User5501 UA
User5501 ZA... (3 Replies)
Hi, I am looking for a unix command which inserts double quotes around all values in a delimited file. For example,
Input File
153665031,abc,abc ,abc
131278839,def,def ,dec
179821481,efg,efg ,lmn ... (6 Replies)
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
Hi,
When working in vi, the CTRL+j command for merging lines is very convenient. Is there an equivalent for splitting them (inserting a line break)? I often find myself pressing "i" + "return" + "esc", which I find a bit lengthy.
Thanks in advance! (3 Replies)
Hi, I am looking for a unix command which inserts double quotes around all values in a text file. For example,
Input:
1234 200 4686 3506056
9646 457 5647 5066762
5656 366 5869 5978459
Output:
"1234" "200" "4686" "3506056"
"9646" "457" "5647" "5066762"
"5656" "366" "5869"... (2 Replies)